Here's a new one: GCC was complaining about an only-used-in-asserts
authorMatt Beaumont-Gay <matthewbg@google.com>
Mon, 30 Jan 2012 19:26:20 +0000 (19:26 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Mon, 30 Jan 2012 19:26:20 +0000 (19:26 +0000)
*function*. Wrap the function in #ifndef NDEBUG.

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

lib/CodeGen/LiveIntervalAnalysis.cpp

index c491d49a969bab6942b966c81874fecfc234733b..8be14ee6853b523445cf6bdda0ce9df423e9b13c 100644 (file)
@@ -797,7 +797,7 @@ void LiveIntervals::addKillFlags() {
   }
 }
 
-
+#ifndef NDEBUG
 static bool intervalRangesSane(const LiveInterval& li) {
   if (li.empty()) {
     return true;
@@ -814,6 +814,7 @@ static bool intervalRangesSane(const LiveInterval& li) {
 
   return true;
 }
+#endif
 
 template <typename DefSetT>
 static void handleMoveDefs(LiveIntervals& lis, SlotIndex origIdx,
@@ -1145,4 +1146,3 @@ LiveRange LiveIntervals::addLiveRangeToEndOfBlock(unsigned reg,
 
   return LR;
 }
-