From b2c3a67015d6633631c124c910231aeba3fca89d Mon Sep 17 00:00:00 2001 From: Lauro Ramos Venancio Date: Thu, 28 Jun 2007 20:06:38 +0000 Subject: Fix a bug in my previous patch. llvm-svn: 37778 --- llvm/lib/Linker/LinkModules.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Linker') 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; -- cgit v1.2.3