diff options
author | Amaury Sechet <deadalnix@gmail.com> | 2016-02-18 20:38:32 +0000 |
---|---|---|
committer | Amaury Sechet <deadalnix@gmail.com> | 2016-02-18 20:38:32 +0000 |
commit | e39e8530da5fa15f98991aa103e4d1cbb1ba7746 (patch) | |
tree | 772b0960ae974a415339588964b17d9b70da5834 /llvm/include/llvm-c | |
parent | da3f20e88ea6ddb2470a9656a0e5dc214fe83407 (diff) | |
download | bcm5719-llvm-e39e8530da5fa15f98991aa103e4d1cbb1ba7746.tar.gz bcm5719-llvm-e39e8530da5fa15f98991aa103e4d1cbb1ba7746.zip |
Add support for invoke/landingpad/resume in C API test
Summary: As per title. There was a lot of part missing in the C API, so I had to extend the invoke and landingpad API.
Reviewers: echristo, joker.eph, Wallbraker
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17359
llvm-svn: 261254
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index c3dacc5b08f..a22e910c455 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -1804,6 +1804,13 @@ LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, void LLVMDeleteFunction(LLVMValueRef Fn); /** + * Check whether the given function has a personality function. + * + * @see llvm::Function::hasPersonalityFn() + */ +LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn); + +/** * Obtain the personality function attached to the function. * * @see llvm::Function::getPersonalityFn() @@ -2469,6 +2476,42 @@ LLVMBool LLVMIsTailCall(LLVMValueRef CallInst); void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall); /** + * Return the normal destination basic block. + * + * This only works on llvm::InvokeInst instructions. + * + * @see llvm::InvokeInst::getNormalDest() + */ +LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef InvokeInst); + +/** + * Return the unwind destination basic block. + * + * This only works on llvm::InvokeInst instructions. + * + * @see llvm::InvokeInst::getUnwindDest() + */ +LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef InvokeInst); + +/** + * Set the normal destination basic block. + * + * This only works on llvm::InvokeInst instructions. + * + * @see llvm::InvokeInst::setNormalDest() + */ +void LLVMSetNormalDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B); + +/** + * Set the unwind destination basic block. + * + * This only works on llvm::InvokeInst instructions. + * + * @see llvm::InvokeInst::setUnwindDest() + */ +void LLVMSetUnwindDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B); + +/** * @} */ @@ -2706,9 +2749,18 @@ void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, /* Add a destination to the indirectbr instruction */ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest); +/* Get the number of clauses on the landingpad instruction */ +unsigned LLVMGetNumClauses(LLVMValueRef LandingPad); + +/* Get the value of the clause at idnex Idx on the landingpad instruction */ +LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx); + /* Add a catch or filter clause to the landingpad instruction */ void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal); +/* Get the 'cleanup' flag in the landingpad instruction */ +LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad); + /* Set the 'cleanup' flag in the landingpad instruction */ void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val); |