summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-07-27 15:28:10 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-07-27 15:28:10 +0000
commit72c0b1cc1b9d012a315448ac1e6d87f6977af731 (patch)
treebf48026c23ac3f74ae00c17419983b82472bf237 /llvm/lib/Transforms/Utils
parent960e7663f35c9bc05b04c6d13fde42aa35a815eb (diff)
downloadbcm5719-llvm-72c0b1cc1b9d012a315448ac1e6d87f6977af731.tar.gz
bcm5719-llvm-72c0b1cc1b9d012a315448ac1e6d87f6977af731.zip
Fix assert from r309278
llvm-svn: 309281
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/FunctionImportUtils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
index 36cbd98052c..fbb61ac1ae9 100644
--- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
+++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
@@ -24,14 +24,14 @@ bool FunctionImportGlobalProcessing::doImportAsDefinition(
const GlobalValue *SGV, SetVector<GlobalValue *> *GlobalsToImport) {
// Only import the globals requested for importing.
- if (GlobalsToImport->count(const_cast<GlobalValue *>(SGV)))
- return true;
+ if (!GlobalsToImport->count(const_cast<GlobalValue *>(SGV)))
+ return false;
assert(!isa<GlobalAlias>(SGV) &&
"Unexpected global alias in the import list.");
- // Otherwise no.
- return false;
+ // Otherwise yes.
+ return true;
}
bool FunctionImportGlobalProcessing::doImportAsDefinition(
OpenPOWER on IntegriCloud