[llvm] a849229 - Fix unused variable warning in NDEBUG mode after 8ba56f322abf848cec78ff7f814f3ad84cd778be

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 19:05:33 PST 2019


Author: James Y Knight
Date: 2019-11-20T22:05:05-05:00
New Revision: a84922916e6eddf701b39fbd7fe0222cb0fee1d6

URL: https://github.com/llvm/llvm-project/commit/a84922916e6eddf701b39fbd7fe0222cb0fee1d6
DIFF: https://github.com/llvm/llvm-project/commit/a84922916e6eddf701b39fbd7fe0222cb0fee1d6.diff

LOG: Fix unused variable warning in NDEBUG mode after 8ba56f322abf848cec78ff7f814f3ad84cd778be

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
index 0e3fcf0eb775..0643480a7099 100644
--- a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
+++ b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
@@ -57,9 +57,9 @@ struct MakeGuardsExplicitLegacyPass : public FunctionPass {
 
 static void turnToExplicitForm(CallInst *Guard, Function *DeoptIntrinsic) {
   // Replace the guard with an explicit branch (just like in GuardWidening).
-  BasicBlock *BB = Guard->getParent();
   makeGuardControlFlowExplicit(DeoptIntrinsic, Guard, true);
-  assert(isWidenableBranch(BB->getTerminator()) && "should hold");
+  assert(isWidenableBranch(Guard->getParent()->getTerminator()) &&
+         "should hold");
 
   Guard->eraseFromParent();
 }


        


More information about the llvm-commits mailing list