Index: bindings/ocaml/llvm/llvm.ml =================================================================== --- bindings/ocaml/llvm/llvm.ml +++ bindings/ocaml/llvm/llvm.ml @@ -1186,6 +1186,7 @@ = "llvm_build_invoke_bc" "llvm_build_invoke_nat" external build_landingpad : lltype -> llvalue -> int -> string -> llbuilder -> llvalue = "llvm_build_landingpad" +external is_cleanup : llvalue -> bool = "llvm_is_cleanup" external set_cleanup : llvalue -> bool -> unit = "llvm_set_cleanup" external add_clause : llvalue -> llvalue -> unit = "llvm_add_clause" external build_resume : llvalue -> llbuilder -> llvalue = "llvm_build_resume" Index: bindings/ocaml/llvm/llvm.mli =================================================================== --- bindings/ocaml/llvm/llvm.mli +++ bindings/ocaml/llvm/llvm.mli @@ -2089,6 +2089,10 @@ val build_landingpad : lltype -> llvalue -> int -> string -> llbuilder -> llvalue +(** [is_cleanup lp] returns 'true' if [landingpad] instruction lp is a cleanup. + See the method [llvm::LandingPadInst::isCleanup]. *) +val is_cleanup : llvalue -> bool + (** [set_cleanup lp] sets the cleanup flag in the [landingpad]instruction. See the method [llvm::LandingPadInst::setCleanup]. *) val set_cleanup : llvalue -> bool -> unit Index: bindings/ocaml/llvm/llvm_ocaml.c =================================================================== --- bindings/ocaml/llvm/llvm_ocaml.c +++ bindings/ocaml/llvm/llvm_ocaml.c @@ -1909,6 +1909,11 @@ return Val_unit; } +/* llvalue -> bool */ +CAMLprim value llvm_is_cleanup(LLVMValueRef LandingPadInst) +{ + return Val_bool(LLVMIsCleanup(LandingPadInst)); +} /* llvalue -> bool -> unit */ CAMLprim value llvm_set_cleanup(LLVMValueRef LandingPadInst, value flag)