From 4e875464df0ff84f7edb5d94be453e7ed28f06ad Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Sat, 1 Jun 2019 03:32:20 +0000 Subject: [PATCH] Inline variable into assert to fix unused variable warning. llvm-svn: 362285 --- llvm/lib/Transforms/Scalar/LoopPredication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LoopPredication.cpp b/llvm/lib/Transforms/Scalar/LoopPredication.cpp index dfecacfcb784..62a79426e25e 100644 --- a/llvm/lib/Transforms/Scalar/LoopPredication.cpp +++ b/llvm/lib/Transforms/Scalar/LoopPredication.cpp @@ -821,9 +821,9 @@ Optional LoopPredication::parseLoopLatchICmp() { return None; } BasicBlock *TrueDest = BI->getSuccessor(0); - BasicBlock *FalseDest = BI->getSuccessor(1); - assert((TrueDest == L->getHeader() || FalseDest == L->getHeader()) && - "One of the latch's destinations must be the header"); + assert( + (TrueDest == L->getHeader() || BI->getSuccessor(1) == L->getHeader()) && + "One of the latch's destinations must be the header"); auto *ICI = dyn_cast(BI->getCondition()); if (!ICI || !BI->isConditional()) {