diff options
author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2017-03-07 20:28:59 +0000 |
---|---|---|
committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2017-03-07 20:28:59 +0000 |
commit | a8f5a8298c0008097e5f038bfd9baac23a528787 (patch) | |
tree | a1c2cc9ec6aecded8bc3c8b0046bb0e4e93bd8a4 | |
parent | 5a4ec5c42b84a56b8c7177f04bd65183f5286402 (diff) | |
download | bcm5719-llvm-a8f5a8298c0008097e5f038bfd9baac23a528787.tar.gz bcm5719-llvm-a8f5a8298c0008097e5f038bfd9baac23a528787.zip |
Fix bugpoint to work with swifterror values
llvm-svn: 297196
-rw-r--r-- | llvm/tools/bugpoint/CrashDebugger.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index 0cae0669477..c076309b22b 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/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; |