]> granicus.if.org Git - llvm/commitdiff
[OCaml] Update api to account for FNeg and CallBr instructions
authorwhitequark <whitequark@whitequark.org>
Tue, 16 Apr 2019 15:00:19 +0000 (15:00 +0000)
committerwhitequark <whitequark@whitequark.org>
Tue, 16 Apr 2019 15:00:19 +0000 (15:00 +0000)
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

bindings/ocaml/llvm/llvm.ml
bindings/ocaml/llvm/llvm.mli
bindings/ocaml/llvm/llvm_ocaml.c

index bbf19652560e7780d86e3b4a5aa796b42aa75e25..f3ff600bde4f3bb254204f2d9b228d4b56c1bdb1 100644 (file)
@@ -244,6 +244,8 @@ module Opcode  = struct
   | CatchPad
   | CleanupPad
   | CatchSwitch
+  | FNeg
+  | CallBr
 end
 
 module LandingPadClauseTy = struct
index c9eeee6b5136a3242bfa6d456698540a62e5f49b..6e145fa44f0458ada607944939457569f662be17 100644 (file)
@@ -266,6 +266,8 @@ module Opcode : sig
   | CatchPad
   | CleanupPad
   | CatchSwitch
+  | FNeg
+  | CallBr
 end
 
 (** The type of a clause of a [landingpad] instruction.
index 1c524551ec6b0b37ccef80dfc0719d79d36d7a70..6af34bd9c172098123c2e7ed1848831a238f9a50 100644 (file)
@@ -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);
 }