aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitfdad2d8095e80d5a5ceac0435c72546e1ace65ee (patch)
treedd04d775afa18847ac056ac8f4ec11a9e5c2dab2 /lib/Linker/LinkModules.cpp
parenta68796cd7ee3ea742ecf74275ca43557508b92c0 (diff)
downloadexternal_llvm-fdad2d8095e80d5a5ceac0435c72546e1ace65ee.zip
external_llvm-fdad2d8095e80d5a5ceac0435c72546e1ace65ee.tar.gz
external_llvm-fdad2d8095e80d5a5ceac0435c72546e1ace65ee.tar.bz2
Missed patch from my last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-rw-r--r--lib/Linker/LinkModules.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index f055b4a..0d8ba4e 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/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