[llvm] 8bcd01f - [ThinLTO] Fix -Wunused-function in NDEBUG builds after llvmorg-10-init-9933-g3d708bf5c26

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 10:02:10 PST 2019


Author: Fangrui Song
Date: 2019-11-15T10:00:23-08:00
New Revision: 8bcd01f48ac8417a07ff941bdbfc422a55a4bc8d

URL: https://github.com/llvm/llvm-project/commit/8bcd01f48ac8417a07ff941bdbfc422a55a4bc8d
DIFF: https://github.com/llvm/llvm-project/commit/8bcd01f48ac8417a07ff941bdbfc422a55a4bc8d.diff

LOG: [ThinLTO] Fix -Wunused-function in NDEBUG builds after llvmorg-10-init-9933-g3d708bf5c26

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/FunctionImport.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 6a45bda7dba7..7b80eb902320 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -627,6 +627,7 @@ static unsigned numGlobalVarSummaries(const ModuleSummaryIndex &Index,
 }
 #endif
 
+#ifndef NDEBUG
 static bool
 checkVariableImport(const ModuleSummaryIndex &Index,
                     StringMap<FunctionImporter::ImportMapTy> &ImportLists,
@@ -657,6 +658,7 @@ checkVariableImport(const ModuleSummaryIndex &Index,
 
   return true;
 }
+#endif
 
 /// Compute all the import and export for every module using the Index.
 void llvm::ComputeCrossModuleImport(


        


More information about the llvm-commits mailing list