diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-05 23:21:39 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-05 23:21:39 +0000 |
commit | 2609888f29b356694123900f48ead8dedb24fcf3 (patch) | |
tree | 01b31ac4b5c5d1eaa976be7cb38e1ed19f8c49d0 /llvm/lib/Linker/LinkModules.cpp | |
parent | e43711d3929f37b79dd07d5cf84e18eb9c7519a2 (diff) | |
download | bcm5719-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.cpp | 10 |
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 |