From: whitequark Date: Tue, 16 Apr 2019 15:00:19 +0000 (+0000) Subject: [OCaml] Update api to account for FNeg and CallBr instructions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fccd1f0eb99100047ee243f9eb8ea3591ab4a28f;p=llvm [OCaml] Update api to account for FNeg and CallBr instructions Summary: This diff adds minimal support for the recent FNeg and CallBr instructions to the OCaml bindings. Reviewers: whitequark Reviewed By: whitequark Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60680 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358501 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml index bbf19652560..f3ff600bde4 100644 --- a/bindings/ocaml/llvm/llvm.ml +++ b/bindings/ocaml/llvm/llvm.ml @@ -244,6 +244,8 @@ module Opcode = struct | CatchPad | CleanupPad | CatchSwitch + | FNeg + | CallBr end module LandingPadClauseTy = struct diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli index c9eeee6b513..6e145fa44f0 100644 --- a/bindings/ocaml/llvm/llvm.mli +++ b/bindings/ocaml/llvm/llvm.mli @@ -266,6 +266,8 @@ module Opcode : sig | CatchPad | CleanupPad | CatchSwitch + | FNeg + | CallBr end (** The type of a clause of a [landingpad] instruction. diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c index 1c524551ec6..6af34bd9c17 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -1534,7 +1534,7 @@ CAMLprim value llvm_instr_get_opcode(LLVMValueRef Inst) { if (!LLVMIsAInstruction(Inst)) failwith("Not an instruction"); o = LLVMGetInstructionOpcode(Inst); - assert (o <= LLVMCatchSwitch); + assert (o <= LLVMCallBr); return Val_int(o); }