diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-08 19:03:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-08 19:03:57 +0000 |
commit | e17fc1d7a2bcc05efc0ebe943254b273c99d77fd (patch) | |
tree | d72fc321dc0c445f8880443050c0a03c2ccdf7d2 /lib/Linker | |
parent | 4035307115ab3d5e9e434526c519155b65ecbae4 (diff) | |
download | external_llvm-e17fc1d7a2bcc05efc0ebe943254b273c99d77fd.zip external_llvm-e17fc1d7a2bcc05efc0ebe943254b273c99d77fd.tar.gz external_llvm-e17fc1d7a2bcc05efc0ebe943254b273c99d77fd.tar.bz2 |
Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index cb2b9e4..a69f724 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -573,9 +573,9 @@ 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(Context, SGV->getType()->getElementType(), + new GlobalVariable(*Dest, SGV->getType()->getElementType(), SGV->isConstant(), SGV->getLinkage(), /*init*/0, - SGV->getName(), Dest, false, + SGV->getName(), 0, false, SGV->getType()->getAddressSpace()); // Propagate alignment, visibility and section info. CopyGVAttributes(NewDGV, SGV); @@ -606,9 +606,9 @@ 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(Context, SGV->getType()->getElementType(), + new GlobalVariable(*Dest, SGV->getType()->getElementType(), SGV->isConstant(), SGV->getLinkage(), /*init*/0, - "", Dest, false, + "", 0, false, SGV->getType()->getAddressSpace()); // Set alignment allowing CopyGVAttributes merge it with alignment of SGV. @@ -634,9 +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(Context, SGV->getType()->getElementType(), + new GlobalVariable(*Dest, SGV->getType()->getElementType(), SGV->isConstant(), NewLinkage, /*init*/0, - DGV->getName(), Dest, false, + DGV->getName(), 0, false, SGV->getType()->getAddressSpace()); // Propagate alignment, section, and visibility info. @@ -1157,8 +1157,8 @@ static bool LinkAppendingVars(Module *M, // Create the new global variable... GlobalVariable *NG = - new GlobalVariable(Context, NewType, G1->isConstant(), G1->getLinkage(), - /*init*/0, First->first, M, G1->isThreadLocal(), + new GlobalVariable(*M, NewType, G1->isConstant(), G1->getLinkage(), + /*init*/0, First->first, 0, G1->isThreadLocal(), G1->getType()->getAddressSpace()); // Propagate alignment, visibility and section info. |