From 24e20583d151fccc4773b5d7f87553bba9bf3bf9 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Mon, 21 Sep 2015 21:29:43 +0000 Subject: Fix UB: can't bind a reference to nullptr (NFC) From: Mehdi Amini llvm-svn: 248213 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp') diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 8aa3c88..a00603b 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/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); -- cgit v1.1