aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Linker
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-11 00:24:53 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-11 00:24:53 +0000
commit7fcb6b65c97f6e2e96643967fca735df528dab8e (patch)
tree767d258346eb30b95144518ae6dd741c40d08ace /lib/Linker
parent6cf9b8adf43b0a460fb4ba8ddbff2787f5aa9d5e (diff)
downloadexternal_llvm-7fcb6b65c97f6e2e96643967fca735df528dab8e.zip
external_llvm-7fcb6b65c97f6e2e96643967fca735df528dab8e.tar.gz
external_llvm-7fcb6b65c97f6e2e96643967fca735df528dab8e.tar.bz2
Fix thinko: alias always defines new symbol. Even is aliasee itself is undefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkArchives.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index 308a775..6cab77c 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();