[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)
llvm-svn: 225258

llvm/tools/opt/Passes.cpp

index 0eb383b..bc17e1d 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;