forked from OSchip/llvm-project
A couple misc fixes so that bugpoint doesn't explode reducing code containing landingpads.
llvm-svn: 143435
This commit is contained in:
parent
eda350d8ab
commit
d4e02a50ba
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue