From fc348d0ac4e43398705e6e441b7ca42c8a24eb6a Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Wed, 24 Mar 2021 14:17:24 -0700 Subject: [PATCH] [sledge][llvm] Add missing TypeKinds, Opcode, and AtomicRMWBinOps Summary: There are several enum values that have been added to LLVM-C that are missing from the OCaml bindings. Reviewed By: jvillard Differential Revision: D27188299 fbshipit-source-id: 215f15469 --- .../llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.ml | 5 +++++ .../llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.mli | 5 +++++ .../llvm-project/llvm/bindings/ocaml/llvm/llvm_ocaml.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.ml b/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.ml index 57c7f4fcd..2c5bcd506 100644 --- a/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.ml +++ b/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.ml @@ -42,6 +42,8 @@ module TypeKind = struct | Metadata | X86_mmx | Token + | ScalableVector + | BFloat end module Linkage = struct @@ -246,6 +248,7 @@ module Opcode = struct | CatchSwitch | FNeg | CallBr + | Freeze end module LandingPadClauseTy = struct @@ -288,6 +291,8 @@ module AtomicRMWBinOp = struct | Min | UMax | UMin + | FAdd + | FSub end module ValueKind = struct diff --git a/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.mli b/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.mli index 0c634e0dc..a6e8d504e 100644 --- a/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.mli +++ b/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm.mli @@ -77,6 +77,8 @@ module TypeKind : sig | Metadata | X86_mmx | Token + | ScalableVector + | BFloat end (** The linkage of a global value, accessed with {!linkage} and @@ -268,6 +270,7 @@ module Opcode : sig | CatchSwitch | FNeg | CallBr + | Freeze end (** The type of a clause of a [landingpad] instruction. @@ -319,6 +322,8 @@ module AtomicRMWBinOp : sig | Min | UMax | UMin + | FAdd + | FSub end (** The kind of an [llvalue], the result of [classify_value v]. diff --git a/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm_ocaml.c b/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm_ocaml.c index 3e0e23d06..e0c6e7c35 100644 --- a/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm_ocaml.c +++ b/sledge/vendor/llvm-dune/llvm-project/llvm/bindings/ocaml/llvm/llvm_ocaml.c @@ -1655,7 +1655,7 @@ CAMLprim value llvm_instr_get_opcode(LLVMValueRef Inst) { if (!LLVMIsAInstruction(Inst)) failwith("Not an instruction"); o = LLVMGetInstructionOpcode(Inst); - assert (o <= LLVMCallBr); + assert (o <= LLVMFreeze); return Val_int(o); }