[PM] Cleanup more warnings my refactoring exposed where now we have
authorChandler Carruth <chandlerc@gmail.com>
Sat, 17 Jan 2015 14:49:23 +0000 (14:49 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 17 Jan 2015 14:49:23 +0000 (14:49 +0000)
unused variables in a no-asserts build.

I've fixed this by putting the entire loop behind an #ifndef as it
contains nothing other than asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226377 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LoopInfo.cpp

index c200f9f36841030102218eefe0466535035fd15c..ec3fed5ac8aa58ff1ebf6ba4ae82f96302a220cd 100644 (file)
@@ -699,12 +699,14 @@ void LoopInfoWrapperPass::verifyAnalysis() const {
   }
 
   // Verify that blocks are mapped to valid loops.
+#ifndef NDEBUG
   for (auto &Entry : LI.LI.BBMap) {
     BasicBlock *BB = Entry.first;
     Loop *L = Entry.second;
     assert(Loops.count(L) && "orphaned loop");
     assert(L->contains(BB) && "orphaned block");
   }
+#endif
 }
 
 void LoopInfoWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {