summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
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 c69010a8196..462a4b7c662 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -578,9 +578,8 @@ static bool LinkAlias(Module *Dest, const Module *Src, std::string *Err) {
// FIXME: we should handle the bitcast alias.
assert(NewAliased && "Can't find the aliased GV.");
- GlobalAlias *NewGA = new GlobalAlias(GA->getType()->getElementType(),
- GA->getLinkage(), GA->getName(),
- NewAliased, Dest);
+ GlobalAlias *NewGA = new GlobalAlias(GA->getType(), GA->getLinkage(),
+ GA->getName(), NewAliased, Dest);
CopyGVAttributes(NewGA, GA);
}
return false;
OpenPOWER on IntegriCloud