[PM] Hide a function we only use in an assert behind NDEBUG.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 6 Jan 2015 09:10:47 +0000 (09:10 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 6 Jan 2015 09:10:47 +0000 (09:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225258 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/Passes.cpp

index 0eb383ba405c73fec998ac9a69892201659e834e..bc17e1d35b52663cd8a37c75b3d5ba6ad92fd7c7 100644 (file)
@@ -102,6 +102,7 @@ void llvm::registerFunctionAnalyses(FunctionAnalysisManager &FAM) {
 #include "PassRegistry.def"
 }
 
+#ifndef NDEBUG
 static bool isModulePassName(StringRef Name) {
 #define MODULE_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
 #define MODULE_ANALYSIS(NAME, CREATE_PASS)                                     \
@@ -111,6 +112,7 @@ static bool isModulePassName(StringRef Name) {
 
   return false;
 }
+#endif
 
 static bool isCGSCCPassName(StringRef Name) {
 #define CGSCC_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;