diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-12 20:24:12 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-12 20:24:12 +0000 |
commit | fae1475823cd77fc51c75b0237a19636b36a6179 (patch) | |
tree | eb14877a08a4fc49514a9d2098577f9c62f6544d /llvm/include/llvm-c/Core.h | |
parent | 9f4f5d94cd9a7245b8dfe36a94790beae5da7c41 (diff) | |
download | bcm5719-llvm-fae1475823cd77fc51c75b0237a19636b36a6179.tar.gz bcm5719-llvm-fae1475823cd77fc51c75b0237a19636b36a6179.zip |
Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.
This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.
llvm-svn: 137501
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 0acf5a23af2..2562757a2ed 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -191,7 +191,8 @@ typedef enum { LLVMAtomicRMW = 57, /* Exception Handling Operators */ - LLVMResume = 58 + LLVMResume = 58, + LLVMLandingPad = 59 } LLVMOpcode; @@ -283,6 +284,11 @@ typedef enum { LLVMRealPredicateTrue /**< Always true (always folded) */ } LLVMRealPredicate; +typedef enum { + LLVMLandingPadCatch, /**< A catch clause */ + LLVMLandingPadFilter /**< A filter clause */ +} LLVMLandingPadClauseTy; + void LLVMInitializeCore(LLVMPassRegistryRef R); @@ -469,6 +475,7 @@ LLVMTypeRef LLVMX86MMXType(void); macro(GetElementPtrInst) \ macro(InsertElementInst) \ macro(InsertValueInst) \ + macro(LandingPadInst) \ macro(PHINode) \ macro(SelectInst) \ macro(ShuffleVectorInst) \ @@ -837,6 +844,12 @@ void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, /* Add a destination to the indirectbr instruction */ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest); +/* Add a catch or filter clause to the landingpad instruction */ +void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal); + +/* Set the 'cleanup' flag in the landingpad instruction */ +void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val); + /* Arithmetic */ LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name); |