[llvm-commits] [llvm] r47977 - /llvm/trunk/lib/Linker/LinkModules.cpp
Anton Korobeynikov
asl at math.spbu.ru
Wed Mar 5 15:21:40 PST 2008
Author: asl
Date: Wed Mar 5 17:21:39 2008
New Revision: 47977
URL: http://llvm.org/viewvc/llvm-project?rev=47977&view=rev
Log:
Missed patch from my last commit
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=47977&r1=47976&r2=47977&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Mar 5 17:21:39 2008
@@ -1046,6 +1046,16 @@
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
More information about the llvm-commits
mailing list