mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -516,7 +516,8 @@ bool LLParser::ParseGlobal(const std::string &Name, LocTy NameLoc,
|
||||
}
|
||||
|
||||
if (GV == 0) {
|
||||
GV = new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage, 0, Name,
|
||||
GV = new GlobalVariable(Context, Ty, false,
|
||||
GlobalValue::ExternalLinkage, 0, Name,
|
||||
M, false, AddrSpace);
|
||||
} else {
|
||||
if (GV->getType()->getElementType() != Ty)
|
||||
@@ -607,7 +608,7 @@ GlobalValue *LLParser::GetGlobalVal(const std::string &Name, const Type *Ty,
|
||||
|
||||
FwdVal = Function::Create(FT, GlobalValue::ExternalWeakLinkage, Name, M);
|
||||
} else {
|
||||
FwdVal = new GlobalVariable(PTy->getElementType(), false,
|
||||
FwdVal = new GlobalVariable(Context, PTy->getElementType(), false,
|
||||
GlobalValue::ExternalWeakLinkage, 0, Name, M);
|
||||
}
|
||||
|
||||
@@ -651,7 +652,7 @@ GlobalValue *LLParser::GetGlobalVal(unsigned ID, const Type *Ty, LocTy Loc) {
|
||||
}
|
||||
FwdVal = Function::Create(FT, GlobalValue::ExternalWeakLinkage, "", M);
|
||||
} else {
|
||||
FwdVal = new GlobalVariable(PTy->getElementType(), false,
|
||||
FwdVal = new GlobalVariable(Context, PTy->getElementType(), false,
|
||||
GlobalValue::ExternalWeakLinkage, 0, "", M);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user