[llvm] r234667 - [Statepoints] Fix a release only build failure

Philip Reames listmail at philipreames.com
Fri Apr 10 17:06:47 PDT 2015


Author: reames
Date: Fri Apr 10 19:06:47 2015
New Revision: 234667

URL: http://llvm.org/viewvc/llvm-project?rev=234667&view=rev
Log:
[Statepoints] Fix a release only build failure

A function which is used only in Asserts builds needs to be defined only in Asserts builds.


Modified:
    llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=234667&r1=234666&r2=234667&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Fri Apr 10 19:06:47 2015
@@ -2014,11 +2014,11 @@ static DenseSet<Value *> computeKillSet(
   return KillSet;
 }
 
+#ifndef NDEBUG
 /// Check that the items in 'Live' dominate 'TI'.  This is used as a basic
 /// sanity check for the liveness computation.
 static void checkBasicSSA(DominatorTree &DT, DenseSet<Value *> &Live,
                           TerminatorInst *TI, bool TermOkay = false) {
-#ifndef NDEBUG
   for (Value *V : Live) {
     if (auto *I = dyn_cast<Instruction>(V)) {
       // The terminator can be a member of the LiveOut set.  LLVM's definition
@@ -2030,7 +2030,6 @@ static void checkBasicSSA(DominatorTree
              "basic SSA liveness expectation violated by liveness analysis");
     }
   }
-#endif
 }
 
 /// Check that all the liveness sets used during the computation of liveness
@@ -2042,6 +2041,7 @@ static void checkBasicSSA(DominatorTree
   checkBasicSSA(DT, Data.LiveOut[&BB], BB.getTerminator(), true);
   checkBasicSSA(DT, Data.LiveIn[&BB], BB.getTerminator());
 }
+#endif
 
 static void computeLiveInValues(DominatorTree &DT, Function &F,
                                 GCPtrLivenessData &Data) {





More information about the llvm-commits mailing list