summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-17 21:29:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-17 21:29:57 +0000
commitf1bedd37471a9f9080e9e48d8b2641bac4cff523 (patch)
tree0ef8736b8333a3ab0a56701b884cbb04c7883fa0 /llvm/lib/Linker/LinkModules.cpp
parent77bbb54fbfbc4aa03af427ce856c419a64e72b86 (diff)
downloadbcm5719-llvm-f1bedd37471a9f9080e9e48d8b2641bac4cff523.tar.gz
bcm5719-llvm-f1bedd37471a9f9080e9e48d8b2641bac4cff523.zip
Use create methods since msvc doesn't handle delegating constructors.
llvm-svn: 209076
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 518b681046a..45f2d4e03a1 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -922,8 +922,9 @@ 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(), PTy->getAddressSpace(),
- SGA->getLinkage(), SGA->getName(), DstM);
+ auto *NewDA =
+ GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(),
+ SGA->getLinkage(), SGA->getName(), DstM);
copyGVAttributes(NewDA, SGA);
if (NewVisibility)
NewDA->setVisibility(*NewVisibility);
OpenPOWER on IntegriCloud