From b85c0caf7df2ba93e68bcc595d53457c0dd613df 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...) llvm-svn: 128802 --- llvm/lib/Transforms/Utils/Local.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 26ae295d5dc0..d7e23364ccf7 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/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)