aboutsummaryrefslogtreecommitdiff
path: root/lib/Linker
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/Linker
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/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index b7ab5dff5d..cb2b9e46b6 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -573,7 +573,7 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
// symbol over in the dest module... the initializer will be filled in
// later by LinkGlobalInits.
GlobalVariable *NewDGV =
- new GlobalVariable(SGV->getType()->getElementType(),
+ new GlobalVariable(Context, SGV->getType()->getElementType(),
SGV->isConstant(), SGV->getLinkage(), /*init*/0,
SGV->getName(), Dest, false,
SGV->getType()->getAddressSpace());
@@ -606,7 +606,7 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
// AppendingVars map. The name is cleared out so that no linkage is
// performed.
GlobalVariable *NewDGV =
- new GlobalVariable(SGV->getType()->getElementType(),
+ new GlobalVariable(Context, SGV->getType()->getElementType(),
SGV->isConstant(), SGV->getLinkage(), /*init*/0,
"", Dest, false,
SGV->getType()->getAddressSpace());
@@ -634,8 +634,9 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
// we are replacing may be a function (if a prototype, weak, etc) or a
// global variable.
GlobalVariable *NewDGV =
- new GlobalVariable(SGV->getType()->getElementType(), SGV->isConstant(),
- NewLinkage, /*init*/0, DGV->getName(), Dest, false,
+ new GlobalVariable(Context, SGV->getType()->getElementType(),
+ SGV->isConstant(), NewLinkage, /*init*/0,
+ DGV->getName(), Dest, false,
SGV->getType()->getAddressSpace());
// Propagate alignment, section, and visibility info.
@@ -1156,7 +1157,7 @@ static bool LinkAppendingVars(Module *M,
// Create the new global variable...
GlobalVariable *NG =
- new GlobalVariable(NewType, G1->isConstant(), G1->getLinkage(),
+ new GlobalVariable(Context, NewType, G1->isConstant(), G1->getLinkage(),
/*init*/0, First->first, M, G1->isThreadLocal(),
G1->getType()->getAddressSpace());