From 7921239c411aeeaef55998cc64495aa1ea1a3ea3 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Sat, 21 Jun 2014 02:43:02 +0000 Subject: Add back functionality removed in r210497. Instead of asserting, output a message stating that a null pointer was found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211430 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/LoopPass.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Analysis/LoopPass.cpp') diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp index 2c6e6e3fff..7bd866e73e 100644 --- a/lib/Analysis/LoopPass.cpp +++ b/lib/Analysis/LoopPass.cpp @@ -45,8 +45,10 @@ public: for (Loop::block_iterator b = L->block_begin(), be = L->block_end(); b != be; ++b) { - assert((*b) != nullptr && "Expecting non-null block"); - (*b)->print(Out); + if (*b) + (*b)->print(Out); + else + Out << "Printing block"; } return false; } -- cgit v1.2.3