[PATCH] D52196: [OCaml] Add missing instruction opcodes to OCaml API
Josh Berdine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 15:53:43 PDT 2018
jberdine created this revision.
jberdine added reviewers: whitequark, mgorny.
Herald added a subscriber: llvm-commits.
The OCaml bindings have become out of date and several opcodes have
been added to the C API without corresponding additions to the OCaml
API.
Repository:
rL LLVM
https://reviews.llvm.org/D52196
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
@@ -1515,7 +1515,7 @@
if (!LLVMIsAInstruction(Inst))
failwith("Not an instruction");
o = LLVMGetInstructionOpcode(Inst);
- assert (o <= LLVMLandingPad);
+ assert (o <= LLVMCatchSwitch);
return Val_int(o);
}
Index: bindings/ocaml/llvm/llvm.mli
===================================================================
--- bindings/ocaml/llvm/llvm.mli
+++ bindings/ocaml/llvm/llvm.mli
@@ -260,6 +260,12 @@
| AtomicRMW
| Resume
| LandingPad
+ | AddrSpaceCast
+ | CleanupRet
+ | CatchRet
+ | CatchPad
+ | CleanupPad
+ | CatchSwitch
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
@@ -238,6 +238,12 @@
| AtomicRMW
| Resume
| LandingPad
+ | AddrSpaceCast
+ | CleanupRet
+ | CatchRet
+ | CatchPad
+ | CleanupPad
+ | CatchSwitch
end
module LandingPadClauseTy = struct
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52196.165843.patch
Type: text/x-patch
Size: 1174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/b1689c98/attachment.bin>
More information about the llvm-commits
mailing list