From 1539440cdf1e3bccfc34cd3c95238bab24f3e65f Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 29 Aug 2017 20:24:39 +0000 Subject: [PATCH] [FunctionImport] Avoid unused variable warnings in Release builds Just skip the entire block in NDEBUG. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312031 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/FunctionImport.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Transforms/IPO/FunctionImport.cpp b/lib/Transforms/IPO/FunctionImport.cpp index 5f077a6aa4d..88f70d961ed 100644 --- a/lib/Transforms/IPO/FunctionImport.cpp +++ b/lib/Transforms/IPO/FunctionImport.cpp @@ -726,6 +726,7 @@ Expected FunctionImporter::importFunctions( GlobalsToImport.insert(&GV); } } +#ifndef NDEBUG for (GlobalAlias &GA : SrcModule->aliases()) { if (!GA.hasName()) continue; @@ -735,6 +736,7 @@ Expected FunctionImporter::importFunctions( << " " << GA.getName() << " from " << SrcModule->getSourceFileName() << "\n"); } +#endif // Upgrade debug info after we're done materializing all the globals and we // have loaded all the required metadata! -- 2.50.1