From 72c0b1cc1b9d012a315448ac1e6d87f6977af731 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 27 Jul 2017 15:28:10 +0000 Subject: [PATCH] Fix assert from r309278 llvm-svn: 309281 --- llvm/lib/Transforms/Utils/FunctionImportUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp index 36cbd98..fbb61ac 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 *GlobalsToImport) { // Only import the globals requested for importing. - if (GlobalsToImport->count(const_cast(SGV))) - return true; + if (!GlobalsToImport->count(const_cast(SGV))) + return false; assert(!isa(SGV) && "Unexpected global alias in the import list."); - // Otherwise no. - return false; + // Otherwise yes. + return true; } bool FunctionImportGlobalProcessing::doImportAsDefinition( -- 2.7.4