summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Archive/Archive.cpp6
-rw-r--r--lib/Linker/LinkArchives.cpp9
2 files changed, 4 insertions, 11 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index 7df5e48f9fa..6c95dbe372e 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -207,10 +207,8 @@ static void getSymbols(Module*M, std::vector<std::string>& symbols) {
// 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());
}
}
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index 308a775acd2..6cab77c6010 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -71,13 +71,8 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
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();