mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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
This commit is contained in:
parent
0325053da3
commit
597362a54b
@ -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
Block a user