Skip to content

Commit

Permalink
[OCaml] Add GlobalIFunc value kind to OCaml API
Browse files Browse the repository at this point in the history
Summary:
The GlobalIFunc value kind has not yet been added to the OCaml
API. This patch only extends the enum, so that e.g. classify_value
will not crash. No support for manipulating or building GlobalIFuncs
is added at this point.

Reviewers: whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D52198

llvm-svn: 342429
  • Loading branch information
whitequark committed Sep 18, 2018
1 parent 17c7040 commit d299b2c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions llvm/bindings/ocaml/llvm/llvm.ml
Expand Up @@ -310,6 +310,7 @@ module ValueKind = struct
| ConstantVector
| Function
| GlobalAlias
| GlobalIFunc
| GlobalVariable
| UndefValue
| Instruction of Opcode.t
Expand Down
1 change: 1 addition & 0 deletions llvm/bindings/ocaml/llvm/llvm.mli
Expand Up @@ -343,6 +343,7 @@ module ValueKind : sig
| ConstantVector
| Function
| GlobalAlias
| GlobalIFunc
| GlobalVariable
| UndefValue
| Instruction of Opcode.t
Expand Down
2 changes: 2 additions & 0 deletions llvm/bindings/ocaml/llvm/llvm_ocaml.c
Expand Up @@ -619,6 +619,7 @@ enum ValueKind {
ConstantVector,
Function,
GlobalAlias,
GlobalIFunc,
GlobalVariable,
UndefValue,
Instruction
Expand Down Expand Up @@ -654,6 +655,7 @@ CAMLprim value llvm_classify_value(LLVMValueRef Val) {
if (LLVMIsAGlobalValue(Val)) {
DEFINE_CASE(Val, Function);
DEFINE_CASE(Val, GlobalAlias);
DEFINE_CASE(Val, GlobalIFunc);
DEFINE_CASE(Val, GlobalVariable);
}
DEFINE_CASE(Val, Argument);
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm-c/Core.h
Expand Up @@ -1465,6 +1465,7 @@ LLVMTypeRef LLVMX86MMXType(void);
macro(ConstantVector) \
macro(GlobalValue) \
macro(GlobalAlias) \
macro(GlobalIFunc) \
macro(GlobalObject) \
macro(Function) \
macro(GlobalVariable) \
Expand Down

0 comments on commit d299b2c

Please sign in to comment.