diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-08 01:26:06 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-08 01:26:06 +0000 |
commit | 5948fdf68b5a1a68e8dbc10d28ef77473d5fc774 (patch) | |
tree | c7898711c9b1c034c981cd9d052a08ecc72f14dc /llvm/lib/AsmParser/LLParser.cpp | |
parent | 5f21d2f69ab3cf891546f9f8eb13f5efa8653329 (diff) | |
download | bcm5719-llvm-5948fdf68b5a1a68e8dbc10d28ef77473d5fc774.tar.gz bcm5719-llvm-5948fdf68b5a1a68e8dbc10d28ef77473d5fc774.zip |
Push LLVMContext through GlobalVariables and IRBuilder.
llvm-svn: 74985
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 3966ab3b5fc..49509d52245 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/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); } |