aboutsummaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-08 01:26:06 +0000
committerOwen Anderson <resistor@mac.com>2009-07-08 01:26:06 +0000
commit3d29df3e8a203b167d8071ea6f805b21db18a5af (patch)
tree04e35fb85689b9621ea6ec76db47849335a87c5c /lib/AsmParser/LLParser.cpp
parent8b8d31e3ec8c491a893307069ac123728c84782c (diff)
Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r--lib/AsmParser/LLParser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 3966ab3b5f..49509d5224 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -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);
}