[llvm-commits] [llvm] r48203 - in /llvm/trunk/lib: Archive/Archive.cpp Linker/LinkArchives.cpp
Anton Korobeynikov
asl at math.spbu.ru
Mon Mar 10 17:24:53 PDT 2008
Author: asl
Date: Mon Mar 10 19:24:53 2008
New Revision: 48203
URL: http://llvm.org/viewvc/llvm-project?rev=48203&view=rev
Log:
Fix thinko: alias always defines new symbol. Even is aliasee itself is undefined.
Modified:
llvm/trunk/lib/Archive/Archive.cpp
llvm/trunk/lib/Linker/LinkArchives.cpp
Modified: llvm/trunk/lib/Archive/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/Archive.cpp?rev=48203&r1=48202&r2=48203&view=diff
==============================================================================
--- llvm/trunk/lib/Archive/Archive.cpp (original)
+++ llvm/trunk/lib/Archive/Archive.cpp Mon Mar 10 19:24:53 2008
@@ -207,10 +207,8 @@
// Loop over aliases
for (Module::alias_iterator AI = M->alias_begin(), AE = M->alias_end();
AI != AE; ++AI) {
- const GlobalValue *Aliased = AI->getAliasedGlobal();
- if (!Aliased->isDeclaration())
- if (AI->hasName())
- symbols.push_back(AI->getName());
+ if (AI->hasName())
+ symbols.push_back(AI->getName());
}
}
Modified: llvm/trunk/lib/Linker/LinkArchives.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkArchives.cpp?rev=48203&r1=48202&r2=48203&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkArchives.cpp (original)
+++ llvm/trunk/lib/Linker/LinkArchives.cpp Mon Mar 10 19:24:53 2008
@@ -71,13 +71,8 @@
for (Module::alias_iterator I = M->alias_begin(), E = M->alias_end();
I != E; ++I)
- if (I->hasName()) {
- const GlobalValue *Aliased = I->getAliasedGlobal();
- if (Aliased->isDeclaration())
- UndefinedSymbols.insert(I->getName());
- else
- DefinedSymbols.insert(I->getName());
- }
+ if (I->hasName())
+ DefinedSymbols.insert(I->getName());
// Prune out any defined symbols from the undefined symbols set...
for (std::set<std::string>::iterator I = UndefinedSymbols.begin();
More information about the llvm-commits
mailing list