From: Philip Reames Date: Sat, 11 Apr 2015 00:06:47 +0000 (+0000) Subject: [Statepoints] Fix a release only build failure X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3e68e2879f0301f7aaefe4a8de85e18510aea99f;p=oota-llvm.git [Statepoints] Fix a release only build failure A function which is used only in Asserts builds needs to be defined only in Asserts builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234667 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 9931442f844..cef3bd08717 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -2014,11 +2014,11 @@ static DenseSet computeKillSet(BasicBlock *BB) { 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 &Live, TerminatorInst *TI, bool TermOkay = false) { -#ifndef NDEBUG for (Value *V : Live) { if (auto *I = dyn_cast(V)) { // The terminator can be a member of the LiveOut set. LLVM's definition @@ -2030,7 +2030,6 @@ static void checkBasicSSA(DominatorTree &DT, DenseSet &Live, "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 &DT, GCPtrLivenessData &Data, 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) {