diff options
| author | James Y Knight <jyknight@google.com> | 2019-11-20 22:18:45 -0500 |
|---|---|---|
| committer | James Y Knight <jyknight@google.com> | 2019-11-20 22:22:51 -0500 |
| commit | e47d6da8a5dd6b9552f7b94e8b35453b4f09ffe4 (patch) | |
| tree | 6b2667fc0dee1ad1f8cfbd2e0b8c37fb8a845df2 /llvm/lib/Transforms | |
| parent | fec3ca77bbce6917c103963b7b85b60dfb865c7b (diff) | |
| download | bcm5719-llvm-e47d6da8a5dd6b9552f7b94e8b35453b4f09ffe4.tar.gz bcm5719-llvm-e47d6da8a5dd6b9552f7b94e8b35453b4f09ffe4.zip | |
D'oh. Fix assert after a84922916e6eddf701b39fbd7fe0222cb0fee1d6.
(Which was attempting to fix unused variable warning in NDEBUG mode after 8ba56f322abf848cec78ff7f814f3ad84cd778be)
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp | 5 |
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(); } |

