From 95fda65f76196cf34c762f37a1381c3ae33202d0 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 20 Feb 2015 07:14:02 +0000 Subject: [PATCH] Fix build in release mode, four cases of -Wunused-variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229976 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 2fa5d0cef29..3c517ee2fa3 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -389,6 +389,7 @@ static Value *findBaseDefiningValue(Value *I) { if (LoadInst *LI = dyn_cast(I)) { if (LI->getType()->isPointerTy()) { Value *Op = LI->getOperand(0); + (void)Op; // Has to be a pointer to an gc object, or possibly an array of such? assert(Op->getType()->isPointerTy()); return LI; // The value loaded is an gc base itself @@ -1104,6 +1105,7 @@ VerifySafepointBounds(const std::pair &bounds) { } else { // This is an invoke safepoint InvokeInst *invoke = dyn_cast(bounds.first); + (void)invoke; assert(invoke && "only continues over invokes!"); assert(invoke->getNormalDest() == bounds.second->getParent() && "safepoint should continue into normal exit block"); @@ -1221,6 +1223,7 @@ makeStatepointExplicitImpl(const CallSite &CS, /* to replace */ Function *F = BB->getParent(); assert(F && "must be set"); Module *M = F->getParent(); + (void)M; assert(M && "must be set"); // We're not changing the function signature of the statepoint since the gc @@ -1887,10 +1890,12 @@ static bool insertParsePoints(Function &F, DominatorTree &DT, Pass *P, } unique_unsorted(live); +#ifndef NDEBUG // sanity check for (auto ptr : live) { assert(isGCPointerType(ptr->getType()) && "must be a gc pointer type"); } +#endif relocationViaAlloca(F, DT, live, records); return !records.empty(); -- 2.34.1