[llvm] r309281 - Fix assert from r309278
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 08:28:10 PDT 2017
Author: dblaikie
Date: Thu Jul 27 08:28:10 2017
New Revision: 309281
URL: http://llvm.org/viewvc/llvm-project?rev=309281&view=rev
Log:
Fix assert from r309278
Modified:
llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
Modified: llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp?rev=309281&r1=309280&r2=309281&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp Thu Jul 27 08:28:10 2017
@@ -24,14 +24,14 @@ bool FunctionImportGlobalProcessing::doI
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(
More information about the llvm-commits
mailing list