aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-04-27 00:55:25 +0000
committerBill Wendling <isanbard@gmail.com>2010-04-27 00:55:25 +0000
commitc3d0e0c8efad3277433f81b415d441f758467871 (patch)
tree3ff603d00f6fda88b151b86f237ea879c1733eb1
parentcaf67504550427d0dc4dc8727e7b67b17d63e5c1 (diff)
downloadexternal_llvm-c3d0e0c8efad3277433f81b415d441f758467871.zip
external_llvm-c3d0e0c8efad3277433f81b415d441f758467871.tar.gz
external_llvm-c3d0e0c8efad3277433f81b415d441f758467871.tar.bz2
r98363 deleted a '!' when cleaning up whitespace. This caused globals which are
*not* declarations to *not* be placed in the "preserve" list. <rdar://problem/7870735> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102405 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/lto/LTOCodeGenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 3ce22e5..0eb9a48 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()));
}