summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
index 0643480a709..5ffae128f5f 100644
--- a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
+++ b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
@@ -57,9 +57,10 @@ struct MakeGuardsExplicitLegacyPass : public FunctionPass {
static void turnToExplicitForm(CallInst *Guard, Function *DeoptIntrinsic) {
// Replace the guard with an explicit branch (just like in GuardWidening).
+ BasicBlock *OriginalBB = Guard->getParent();
+ (void)OriginalBB;
makeGuardControlFlowExplicit(DeoptIntrinsic, Guard, true);
- assert(isWidenableBranch(Guard->getParent()->getTerminator()) &&
- "should hold");
+ assert(isWidenableBranch(OriginalBB->getTerminator()) && "should hold");
Guard->eraseFromParent();
}
OpenPOWER on IntegriCloud