From: Benjamin Kramer Date: Tue, 29 Aug 2017 20:24:39 +0000 (+0000) Subject: [FunctionImport] Avoid unused variable warnings in Release builds X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1539440cdf1e3bccfc34cd3c95238bab24f3e65f;p=llvm [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 --- 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!