[IR] Reformulate LLVM's EH funclet IR
[oota-llvm.git] / lib / IR / Instruction.cpp
index 7bd50328b126bc95a4a24f3b81f24cca42fbb7c3..ce2e1d8c02b3ea8ac620ce8e0808e8b7542b2ad2 100644 (file)
@@ -202,11 +202,10 @@ const char *Instruction::getOpcodeName(unsigned OpCode) {
   case Invoke: return "invoke";
   case Resume: return "resume";
   case Unreachable: return "unreachable";
-  case CleanupEndPad: return "cleanupendpad";
   case CleanupRet: return "cleanupret";
-  case CatchEndPad: return "catchendpad";
   case CatchRet: return "catchret";
   case CatchPad: return "catchpad";
+  case CatchSwitch: return "catchswitch";
   case TerminatePad: return "terminatepad";
 
   // Standard binary operators...
@@ -476,10 +475,8 @@ bool Instruction::mayThrow() const {
     return !CI->doesNotThrow();
   if (const auto *CRI = dyn_cast<CleanupReturnInst>(this))
     return CRI->unwindsToCaller();
-  if (const auto *CEPI = dyn_cast<CleanupEndPadInst>(this))
-    return CEPI->unwindsToCaller();
-  if (const auto *CEPI = dyn_cast<CatchEndPadInst>(this))
-    return CEPI->unwindsToCaller();
+  if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(this))
+    return CatchSwitch->unwindsToCaller();
   if (const auto *TPI = dyn_cast<TerminatePadInst>(this))
     return TPI->unwindsToCaller();
   return isa<ResumeInst>(this);