From: Bill Wendling Date: Tue, 27 Apr 2010 00:55:25 +0000 (+0000) Subject: r98363 deleted a '!' when cleaning up whitespace. This caused globals which are X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c3d0e0c8efad3277433f81b415d441f758467871;p=oota-llvm.git r98363 deleted a '!' when cleaning up whitespace. This caused globals which are *not* declarations to *not* be placed in the "preserve" list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102405 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 3ce22e5de41..0eb9a48d0de 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -328,7 +328,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { } for (Module::global_iterator v = mergedModule->global_begin(), e = mergedModule->global_end(); v != e; ++v) { - if (v->isDeclaration() && + if (!v->isDeclaration() && _mustPreserveSymbols.count(mangler.getNameWithPrefix(v))) mustPreserveList.push_back(::strdup(v->getNameStr().c_str())); }