Missed patch from my last commit

llvm-svn: 47977
This commit is contained in:
Anton Korobeynikov 2008-03-05 23:21:39 +00:00
parent e43711d392
commit 2609888f29
1 changed files with 10 additions and 0 deletions

View File

@ -1046,6 +1046,16 @@ static bool LinkAppendingVars(Module *M,
return false;
}
static bool ResolveAliases(Module *Dest) {
for (Module::alias_iterator I = Dest->alias_begin(), E = Dest->alias_end();
I != E; ++I) {
GlobalValue* GV = const_cast<GlobalValue*>(I->getAliasedGlobal());
if (!GV->isDeclaration())
I->replaceAllUsesWith(GV);
}
return false;
}
// LinkModules - This function links two modules together, with the resulting
// left module modified to be the composite of the two input modules. If an