New EH representation for MSVC compatibility
[oota-llvm.git] / include / llvm / IR / Instruction.h
index 31f363f70a5b13100b899f536d9bfa393bd781fe..3c48efb4561625a5570dc5b1b0ed52a9f691dab0 100644 (file)
@@ -388,6 +388,20 @@ public:
     return mayWriteToMemory() || mayThrow() || !mayReturn();
   }
 
+  /// \brief Return true if the instruction is a variety of EH-block.
+  bool isEHPad() const {
+    switch (getOpcode()) {
+    case Instruction::CatchPad:
+    case Instruction::CatchEndPad:
+    case Instruction::CleanupPad:
+    case Instruction::LandingPad:
+    case Instruction::TerminatePad:
+      return true;
+    default:
+      return false;
+    }
+  }
+
   /// clone() - Create a copy of 'this' instruction that is identical in all
   /// ways except the following:
   ///   * The instruction has no parent