summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
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