From 7fcb6b65c97f6e2e96643967fca735df528dab8e Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Tue, 11 Mar 2008 00:24:53 +0000 Subject: 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 --- lib/Archive/Archive.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Archive/Archive.cpp') diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp index 7df5e48f9f..6c95dbe372 100644 --- a/lib/Archive/Archive.cpp +++ b/lib/Archive/Archive.cpp @@ -207,10 +207,8 @@ static void getSymbols(Module*M, std::vector& 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()); } } -- cgit v1.2.3-18-g5258