summaryrefslogtreecommitdiff
path: root/lib/Linker
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
commitc86235f4eb3ee71272aed492d3faa18360d54bbc (patch)
tree457375892b6c914a95ac0dc0d8bd5442b484e869 /lib/Linker
parente7a6c2f1dfca147cdedb9683f7193882b548753d (diff)
downloadllvm-c86235f4eb3ee71272aed492d3faa18360d54bbc.tar.gz
llvm-c86235f4eb3ee71272aed492d3faa18360d54bbc.tar.bz2
llvm-c86235f4eb3ee71272aed492d3faa18360d54bbc.tar.xz
Use create methods since msvc doesn't handle delegating constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 518b681046..45f2d4e03a 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/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);