llvm.org GIT mirror llvm / fbd5ffc
[OCaml] Add OCaml API for LLVMIsCleanup Summary: Expose test for whether or not a landingpad is a cleanup. Reviewers: whitequark Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52205 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342438 91177308-0d34-0410-b5e6-96231b3b80d8 whitequark 1 year, 1 month ago
3 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11861186 = "llvm_build_invoke_bc" "llvm_build_invoke_nat"
11871187 external build_landingpad : lltype -> llvalue -> int -> string -> llbuilder ->
11881188 llvalue = "llvm_build_landingpad"
1189 external is_cleanup : llvalue -> bool = "llvm_is_cleanup"
11891190 external set_cleanup : llvalue -> bool -> unit = "llvm_set_cleanup"
11901191 external add_clause : llvalue -> llvalue -> unit = "llvm_add_clause"
11911192 external build_resume : llvalue -> llbuilder -> llvalue = "llvm_build_resume"
20922092 val build_landingpad : lltype -> llvalue -> int -> string -> llbuilder ->
20932093 llvalue
20942094
2095 (** [is_cleanup lp] returns [true] if [landingpad] instruction lp is a cleanup.
2096 See the method [llvm::LandingPadInst::isCleanup]. *)
2097 val is_cleanup : llvalue -> bool
2098
20952099 (** [set_cleanup lp] sets the cleanup flag in the [landingpad]instruction.
20962100 See the method [llvm::LandingPadInst::setCleanup]. *)
20972101 val set_cleanup : llvalue -> bool -> unit
19131913 return Val_unit;
19141914 }
19151915
1916 /* llvalue -> bool */
1917 CAMLprim value llvm_is_cleanup(LLVMValueRef LandingPadInst)
1918 {
1919 return Val_bool(LLVMIsCleanup(LandingPadInst));
1920 }
19161921
19171922 /* llvalue -> bool -> unit */
19181923 CAMLprim value llvm_set_cleanup(LLVMValueRef LandingPadInst, value flag)