From: Arnold Schwaighofer Date: Tue, 7 Mar 2017 20:28:59 +0000 (+0000) Subject: Fix bugpoint to work with swifterror values X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43959eee19a2f3bbbb5930934d174dcdc38bf6fd;p=llvm Fix bugpoint to work with swifterror values git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297196 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index 0cae0669477..c076309b22b 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/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(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;