Fix a bug in my previous patch.

llvm-svn: 37778
This commit is contained in:
Lauro Ramos Venancio 2007-06-28 20:06:38 +00:00
parent 370ff247c8
commit 04172124dd

View File

@ -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;