summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-05 23:21:39 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-05 23:21:39 +0000
commit2609888f29b356694123900f48ead8dedb24fcf3 (patch)
tree01b31ac4b5c5d1eaa976be7cb38e1ed19f8c49d0 /llvm/lib/Linker/LinkModules.cpp
parente43711d3929f37b79dd07d5cf84e18eb9c7519a2 (diff)
downloadbcm5719-llvm-2609888f29b356694123900f48ead8dedb24fcf3.tar.gz
bcm5719-llvm-2609888f29b356694123900f48ead8dedb24fcf3.zip
Missed patch from my last commit
llvm-svn: 47977
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index f055b4af92f..0d8ba4e3e88 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -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
OpenPOWER on IntegriCloud