summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/CrashDebugger.cpp
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
commitd4e02a50ba863eafe41aad097d8e4190df5490b5 (patch)
tree3499f46a4f63ce9b337234e22f44c7fa526184ae /llvm/tools/bugpoint/CrashDebugger.cpp
parenteda350d8aba33bebe6b9c3123ea701961970b7a5 (diff)
downloadbcm5719-llvm-d4e02a50ba863eafe41aad097d8e4190df5490b5.tar.gz
bcm5719-llvm-d4e02a50ba863eafe41aad097d8e4190df5490b5.zip
A couple misc fixes so that bugpoint doesn't explode reducing code containing landingpads.
llvm-svn: 143435
Diffstat (limited to 'llvm/tools/bugpoint/CrashDebugger.cpp')
-rw-r--r--llvm/tools/bugpoint/CrashDebugger.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp
index f19ef6222f5..a0aaf5362b8 100644
--- a/llvm/tools/bugpoint/CrashDebugger.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud