From: Mehdi Amini Date: Mon, 21 Sep 2015 21:29:43 +0000 (+0000) Subject: Fix UB: can't bind a reference to nullptr (NFC) X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=527648ee94e54df2e30c04489c4b88fca1343553;p=oota-llvm.git Fix UB: can't bind a reference to nullptr (NFC) From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248213 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 8aa3c887c24..a00603bd22f 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -419,7 +419,7 @@ bool LoopUnswitch::runOnLoop(Loop *L, LPPassManager &LPM_Ref) { Function *F = currentLoop->getHeader()->getParent(); bool Changed = false; do { - assert(currentLoop->isLCSSAForm(*DT)); + assert(!DT || currentLoop->isLCSSAForm(*DT)); redoLoop = false; Changed |= processCurrentLoop(); } while(redoLoop);