Index: llvm/trunk/bindings/ocaml/llvm/llvm.ml =================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.ml +++ llvm/trunk/bindings/ocaml/llvm/llvm.ml @@ -1187,6 +1187,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: llvm/trunk/bindings/ocaml/llvm/llvm.mli =================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.mli +++ llvm/trunk/bindings/ocaml/llvm/llvm.mli @@ -2093,6 +2093,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: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c =================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c +++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c @@ -1914,6 +1914,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)