Fix build warning
authorAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 4 Sep 2015 23:58:32 +0000 (23:58 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 4 Sep 2015 23:58:32 +0000 (23:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246899 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyCFG.cpp

index 534c738f832d9945fb7df07ac2917a501adf51b9..1834b813453a504868c6ab01cb5ec0ca9ad2e367 100644 (file)
@@ -3092,8 +3092,6 @@ bool SimplifyCFGOpt::SimplifyCleanupReturn(CleanupReturnInst *RI) {
           NewTPI->takeName(TPI);
           NewTPI->setDebugLoc(TPI->getDebugLoc());
           TPI->eraseFromParent();
-        } else if (auto *CPI = dyn_cast<CatchPadInst>(TI)) {
-          llvm_unreachable("A catchpad may not unwind to a cleanuppad.");
         } else {
           llvm_unreachable("Unexpected predecessor to cleanup pad.");
         }
@@ -3111,8 +3109,6 @@ bool SimplifyCFGOpt::SimplifyCleanupReturn(CleanupReturnInst *RI) {
         CEP->setUnwindDest(UnwindDest);
       else if (auto *TPI = dyn_cast<TerminatePadInst>(TI))
         TPI->setUnwindDest(UnwindDest);
-      else if (auto *CPI = dyn_cast<CatchPadInst>(TI))
-        llvm_unreachable("A catchpad may not unwind to a cleanuppad.");
       else
         llvm_unreachable("Unexpected predecessor to cleanup pad.");
     }