OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1765e8
)
Ultimately resolve aliases during linking, if possible
author
Anton Korobeynikov
<asl@math.spbu.ru>
Tue, 11 Mar 2008 22:51:09 +0000
(22:51 +0000)
committer
Anton Korobeynikov
<asl@math.spbu.ru>
Tue, 11 Mar 2008 22:51:09 +0000
(22:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48259
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Linker/LinkModules.cpp
patch
|
blob
|
history
diff --git
a/lib/Linker/LinkModules.cpp
b/lib/Linker/LinkModules.cpp
index
3d6e526
..
32c4990
100644
(file)
--- a/
lib/Linker/LinkModules.cpp
+++ b/
lib/Linker/LinkModules.cpp
@@
-1087,11
+1087,10
@@
static bool LinkAppendingVars(Module *M,
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);
- }
+ I != E; ++I)
+ if (const GlobalValue *GV = I->resolveAliasedGlobal())
+ if (!GV->isDeclaration())
+ I->replaceAllUsesWith(const_cast<GlobalValue*>(GV));
return false;
}