[llvm] r342427 - [OCaml] Add missing instruction opcodes to OCaml API
whitequark via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 17:00:54 PDT 2018
Author: whitequark
Date: Mon Sep 17 17:00:53 2018
New Revision: 342427
URL: http://llvm.org/viewvc/llvm-project?rev=342427&view=rev
Log:
[OCaml] Add missing instruction opcodes to OCaml API
Summary:
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.
Reviewers: whitequark, mgorny
Reviewed By: whitequark
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52196
Modified:
llvm/trunk/bindings/ocaml/llvm/llvm.ml
llvm/trunk/bindings/ocaml/llvm/llvm.mli
llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.ml?rev=342427&r1=342426&r2=342427&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm.ml (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm.ml Mon Sep 17 17:00:53 2018
@@ -238,6 +238,12 @@ module Opcode = struct
| AtomicRMW
| Resume
| LandingPad
+ | AddrSpaceCast
+ | CleanupRet
+ | CatchRet
+ | CatchPad
+ | CleanupPad
+ | CatchSwitch
end
module LandingPadClauseTy = struct
Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=342427&r1=342426&r2=342427&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Mon Sep 17 17:00:53 2018
@@ -260,6 +260,12 @@ module Opcode : sig
| AtomicRMW
| Resume
| LandingPad
+ | AddrSpaceCast
+ | CleanupRet
+ | CatchRet
+ | CatchPad
+ | CleanupPad
+ | CatchSwitch
end
(** The type of a clause of a [landingpad] instruction.
Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=342427&r1=342426&r2=342427&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Mon Sep 17 17:00:53 2018
@@ -1515,7 +1515,7 @@ CAMLprim value llvm_instr_get_opcode(LLV
if (!LLVMIsAInstruction(Inst))
failwith("Not an instruction");
o = LLVMGetInstructionOpcode(Inst);
- assert (o <= LLVMLandingPad);
+ assert (o <= LLVMCatchSwitch);
return Val_int(o);
}
More information about the llvm-commits
mailing list