aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/bugpoint/CrashDebugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/bugpoint/CrashDebugger.cpp')
-rw-r--r--contrib/llvm/tools/bugpoint/CrashDebugger.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/llvm/tools/bugpoint/CrashDebugger.cpp b/contrib/llvm/tools/bugpoint/CrashDebugger.cpp
index 0cae0669477f..2fd8699c5fc8 100644
--- a/contrib/llvm/tools/bugpoint/CrashDebugger.cpp
+++ b/contrib/llvm/tools/bugpoint/CrashDebugger.cpp
@@ -731,7 +731,8 @@ bool ReduceCrashingInstructions::TestInsts(
for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
Instruction *Inst = &*I++;
if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst) &&
- !Inst->isEHPad() && !Inst->getType()->isTokenTy()) {
+ !Inst->isEHPad() && !Inst->getType()->isTokenTy() &&
+ !Inst->isSwiftError()) {
if (!Inst->getType()->isVoidTy())
Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
Inst->eraseFromParent();
@@ -1015,7 +1016,8 @@ static Error ReduceInsts(BugDriver &BD,
// TODO: Should this be some kind of interrupted error?
return Error::success();
- if (I->isEHPad() || I->getType()->isTokenTy())
+ if (I->isEHPad() || I->getType()->isTokenTy() ||
+ I->isSwiftError())
continue;
outs() << "Checking instruction: " << *I;
@@ -1111,7 +1113,7 @@ static Error DebugACrash(BugDriver &BD,
BD.EmitProgressBitcode(BD.getProgram(), "reduced-blocks");
}
- if (!DisableSimplifyCFG & !BugpointIsInterrupted) {
+ if (!DisableSimplifyCFG && !BugpointIsInterrupted) {
std::vector<const BasicBlock *> Blocks;
for (Function &F : *BD.getProgram())
for (BasicBlock &BB : F)