From eeb7f4ce2dca47453d5e39448a4aa61c1c7d72d1 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 4 Apr 2011 00:37:38 +0000 Subject: [PATCH] Attempt to fix breakage from r128782 reported by Francois Pichet on llvm-commits. (Not sure why it only breaks on Windows; maybe it has something to do with the iterator representation...) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128802 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/Local.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 26ae295d5dc..d7e23364ccf 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -333,6 +333,9 @@ bool llvm::SimplifyInstructionsInBlock(BasicBlock *BB, const TargetData *TD) { continue; } + if (Inst->isTerminator()) + break; + WeakVH BIHandle(BI); MadeChange |= RecursivelyDeleteTriviallyDeadInstructions(Inst); if (BIHandle != BI) -- 2.34.1