[WinEH] Add cleanupendpad instruction
[oota-llvm.git] / lib / IR / Instruction.cpp
index 0dc8633ac2ac5a256d9fd95ca806ce57abb90acb..908e79039b51eafe78cdcfe2ed6c088cd90f1b64 100644 (file)
@@ -196,6 +196,7 @@ 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";
@@ -467,6 +468,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 *TPI = dyn_cast<TerminatePadInst>(this))