[llvm-commits] [llvm] r112698 - /llvm/trunk/include/llvm/IntrinsicInst.h

Duncan Sands baldrick at free.fr
Wed Sep 1 02:26:00 PDT 2010


Author: baldrick
Date: Wed Sep  1 04:26:00 2010
New Revision: 112698

URL: http://llvm.org/viewvc/llvm-project?rev=112698&view=rev
Log:
Add convenience class for working with eh.exception calls.

Modified:
    llvm/trunk/include/llvm/IntrinsicInst.h

Modified: llvm/trunk/include/llvm/IntrinsicInst.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicInst.h?rev=112698&r1=112697&r2=112698&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IntrinsicInst.h (original)
+++ llvm/trunk/include/llvm/IntrinsicInst.h Wed Sep  1 04:26:00 2010
@@ -269,6 +269,20 @@
     }
   };
 
+  /// 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 {





More information about the llvm-commits mailing list