OSDN Git Service

[FunctionImport] Avoid unused variable warnings in Release builds
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 29 Aug 2017 20:24:39 +0000 (20:24 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 29 Aug 2017 20:24:39 +0000 (20:24 +0000)
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

index 5f077a6..88f70d9 100644 (file)
@@ -726,6 +726,7 @@ Expected<bool> FunctionImporter::importFunctions(
         GlobalsToImport.insert(&GV);
       }
     }
+#ifndef NDEBUG
     for (GlobalAlias &GA : SrcModule->aliases()) {
       if (!GA.hasName())
         continue;
@@ -735,6 +736,7 @@ Expected<bool> 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!