aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-11-01 04:40:56 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-11-01 04:40:56 +0000
commit597362a54bf4bb8de5538b4a1d97c618b18a023c (patch)
tree150874215d08d8cd38c68b975b8b82350e137167
parent0325053da3be307007784d91b9a50aada7ac6044 (diff)
downloadexternal_llvm-597362a54bf4bb8de5538b4a1d97c618b18a023c.zip
external_llvm-597362a54bf4bb8de5538b4a1d97c618b18a023c.tar.gz
external_llvm-597362a54bf4bb8de5538b4a1d97c618b18a023c.tar.bz2
A couple misc fixes so that bugpoint doesn't explode reducing code containing landingpads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143435 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/bugpoint/CrashDebugger.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp
index f19ef62..a0aaf53 100644
--- a/tools/bugpoint/CrashDebugger.cpp
+++ b/tools/bugpoint/CrashDebugger.cpp
@@ -401,7 +401,8 @@ bool ReduceCrashingInstructions::TestInsts(std::vector<const Instruction*>
for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI)
for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
Instruction *Inst = I++;
- if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst)) {
+ if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst) &&
+ !isa<LandingPadInst>(Inst)) {
if (!Inst->getType()->isVoidTy())
Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
Inst->eraseFromParent();
@@ -574,6 +575,9 @@ static bool DebugACrash(BugDriver &BD,
} else {
if (BugpointIsInterrupted) goto ExitLoops;
+ if (isa<LandingPadInst>(I))
+ continue;
+
outs() << "Checking instruction: " << *I;
Module *M = BD.deleteInstructionFromProgram(I, Simplification);