From: Richard Trieu Date: Sat, 1 Jun 2019 03:32:20 +0000 (+0000) Subject: Inline variable into assert to fix unused variable warning. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=338487191e2aaf48541942b36fe42a15c4cdc641;p=llvm Inline variable into assert to fix unused variable warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362285 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopPredication.cpp b/lib/Transforms/Scalar/LoopPredication.cpp index dfecacfcb78..62a79426e25 100644 --- a/lib/Transforms/Scalar/LoopPredication.cpp +++ b/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()) {