[llvm] r229976 - Fix build in release mode, four cases of -Wunused-variable.

Nick Lewycky nicholas at mxc.ca
Thu Feb 19 23:14:03 PST 2015


Author: nicholas
Date: Fri Feb 20 01:14:02 2015
New Revision: 229976

URL: http://llvm.org/viewvc/llvm-project?rev=229976&view=rev
Log:
Fix build in release mode, four cases of -Wunused-variable.

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=229976&r1=229975&r2=229976&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Fri Feb 20 01:14:02 2015
@@ -389,6 +389,7 @@ static Value *findBaseDefiningValue(Valu
   if (LoadInst *LI = dyn_cast<LoadInst>(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<In
   } else {
     // This is an invoke safepoint
     InvokeInst *invoke = dyn_cast<InvokeInst>(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 CallSit
   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 &
   }
   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();





More information about the llvm-commits mailing list