From 248e7592b5d7ccba5def625300960a00dddd6e55 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 1 Sep 2010 09:26:00 +0000 Subject: [PATCH] Add convenience class for working with eh.exception calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112698 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IntrinsicInst.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index 0c69e0786f5..a17fa9cc5bd 100644 --- a/include/llvm/IntrinsicInst.h +++ b/include/llvm/IntrinsicInst.h @@ -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(V) && classof(cast(V)); + } + }; + /// EHSelectorInst - This represents the llvm.eh.selector instruction. /// class EHSelectorInst : public IntrinsicInst { -- 2.34.1