[PATCH] D60680: [OCaml] Update api to account for FNeg and CallBr instructions

Josh Berdine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 03:06:33 PDT 2019


jberdine created this revision.
jberdine added a reviewer: whitequark.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This diff adds minimal support for the recent FNeg and CallBr
instructions to the OCaml bindings.


Repository:
  rL LLVM

https://reviews.llvm.org/D60680

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


Index: bindings/ocaml/llvm/llvm_ocaml.c
===================================================================
--- bindings/ocaml/llvm/llvm_ocaml.c
+++ bindings/ocaml/llvm/llvm_ocaml.c
@@ -1534,7 +1534,7 @@
   if (!LLVMIsAInstruction(Inst))
       failwith("Not an instruction");
   o = LLVMGetInstructionOpcode(Inst);
-  assert (o <= LLVMCatchSwitch);
+  assert (o <= LLVMCallBr);
   return Val_int(o);
 }
 
Index: bindings/ocaml/llvm/llvm.mli
===================================================================
--- bindings/ocaml/llvm/llvm.mli
+++ bindings/ocaml/llvm/llvm.mli
@@ -266,6 +266,8 @@
   | CatchPad
   | CleanupPad
   | CatchSwitch
+  | FNeg
+  | CallBr
 end
 
 (** The type of a clause of a [landingpad] instruction.
Index: bindings/ocaml/llvm/llvm.ml
===================================================================
--- bindings/ocaml/llvm/llvm.ml
+++ bindings/ocaml/llvm/llvm.ml
@@ -244,6 +244,8 @@
   | CatchPad
   | CleanupPad
   | CatchSwitch
+  | FNeg
+  | CallBr
 end
 
 module LandingPadClauseTy = struct


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60680.195119.patch
Type: text/x-patch
Size: 1028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190415/37d4efb6/attachment.bin>


More information about the llvm-commits mailing list