summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-17 19:57:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-17 19:57:46 +0000
commit83705658205c8767ee024513297e5d921eca6db6 (patch)
tree463f2843c05cf96f972581ae5c05acce84554b76 /llvm/lib/Linker/LinkModules.cpp
parente8daa2f843e280607db9e5c8ca1b72db1f62c21e (diff)
downloadbcm5719-llvm-83705658205c8767ee024513297e5d921eca6db6.tar.gz
bcm5719-llvm-83705658205c8767ee024513297e5d921eca6db6.zip
Reduce abuse of default values in the GlobalAlias constructor.
This is in preparation for adding an optional offset. llvm-svn: 209073
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index cf49d3fd556..518b681046a 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -922,9 +922,8 @@ bool ModuleLinker::linkAliasProto(GlobalAlias *SGA) {
// If there is no linkage to be performed or we're linking from the source,
// bring over SGA.
auto *PTy = cast<PointerType>(TypeMap.get(SGA->getType()));
- auto *NewDA =
- new GlobalAlias(PTy->getElementType(), SGA->getLinkage(), SGA->getName(),
- /*aliasee*/ nullptr, DstM, PTy->getAddressSpace());
+ auto *NewDA = new GlobalAlias(PTy->getElementType(), PTy->getAddressSpace(),
+ SGA->getLinkage(), SGA->getName(), DstM);
copyGVAttributes(NewDA, SGA);
if (NewVisibility)
NewDA->setVisibility(*NewVisibility);
OpenPOWER on IntegriCloud