[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
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent 637b566726
commit fc348d0ac4

@ -42,6 +42,8 @@ module TypeKind = struct
| Metadata | Metadata
| X86_mmx | X86_mmx
| Token | Token
| ScalableVector
| BFloat
end end
module Linkage = struct module Linkage = struct
@ -246,6 +248,7 @@ module Opcode = struct
| CatchSwitch | CatchSwitch
| FNeg | FNeg
| CallBr | CallBr
| Freeze
end end
module LandingPadClauseTy = struct module LandingPadClauseTy = struct
@ -288,6 +291,8 @@ module AtomicRMWBinOp = struct
| Min | Min
| UMax | UMax
| UMin | UMin
| FAdd
| FSub
end end
module ValueKind = struct module ValueKind = struct

@ -77,6 +77,8 @@ module TypeKind : sig
| Metadata | Metadata
| X86_mmx | X86_mmx
| Token | Token
| ScalableVector
| BFloat
end end
(** The linkage of a global value, accessed with {!linkage} and (** The linkage of a global value, accessed with {!linkage} and
@ -268,6 +270,7 @@ module Opcode : sig
| CatchSwitch | CatchSwitch
| FNeg | FNeg
| CallBr | CallBr
| Freeze
end end
(** The type of a clause of a [landingpad] instruction. (** The type of a clause of a [landingpad] instruction.
@ -319,6 +322,8 @@ module AtomicRMWBinOp : sig
| Min | Min
| UMax | UMax
| UMin | UMin
| FAdd
| FSub
end end
(** The kind of an [llvalue], the result of [classify_value v]. (** The kind of an [llvalue], the result of [classify_value v].

@ -1655,7 +1655,7 @@ CAMLprim value llvm_instr_get_opcode(LLVMValueRef Inst) {
if (!LLVMIsAInstruction(Inst)) if (!LLVMIsAInstruction(Inst))
failwith("Not an instruction"); failwith("Not an instruction");
o = LLVMGetInstructionOpcode(Inst); o = LLVMGetInstructionOpcode(Inst);
assert (o <= LLVMCallBr); assert (o <= LLVMFreeze);
return Val_int(o); return Val_int(o);
} }

Loading…
Cancel
Save