Add convenience class for working with eh.exception calls.
[oota-llvm.git] / include / llvm / IntrinsicInst.h
index 0c69e0786f5c131ea7fe949c2579865dcb68bba6..a17fa9cc5bdd4236ce202aa1f7f49d3739c52e45 100644 (file)
@@ -269,6 +269,20 @@ namespace llvm {
     }
   };
 
+  /// EHExceptionInst - This represents the llvm.eh.exception instruction.
+  ///
+  class EHExceptionInst : public IntrinsicInst {
+  public:
+    // Methods for support type inquiry through isa, cast, and dyn_cast:
+    static inline bool classof(const EHExceptionInst *) { return true; }
+    static inline bool classof(const IntrinsicInst *I) {
+      return I->getIntrinsicID() == Intrinsic::eh_exception;
+    }
+    static inline bool classof(const Value *V) {
+      return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
+    }
+  };
+
   /// EHSelectorInst - This represents the llvm.eh.selector instruction.
   ///
   class EHSelectorInst : public IntrinsicInst {