[llvm-commits] [llvm] r143435 - /llvm/trunk/tools/bugpoint/CrashDebugger.cpp

Eli Friedman eli.friedman at gmail.com
Mon Oct 31 21:40:56 PDT 2011


Author: efriedma
Date: Mon Oct 31 23:40:56 2011
New Revision: 143435

URL: http://llvm.org/viewvc/llvm-project?rev=143435&view=rev
Log:
A couple misc fixes so that bugpoint doesn't explode reducing code containing landingpads.


Modified:
    llvm/trunk/tools/bugpoint/CrashDebugger.cpp

Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=143435&r1=143434&r2=143435&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original)
+++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Mon Oct 31 23:40:56 2011
@@ -401,7 +401,8 @@
     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 @@
             } else {
               if (BugpointIsInterrupted) goto ExitLoops;
 
+              if (isa<LandingPadInst>(I))
+                continue;
+
               outs() << "Checking instruction: " << *I;
               Module *M = BD.deleteInstructionFromProgram(I, Simplification);
 





More information about the llvm-commits mailing list