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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342429 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
whitequark committed Sep 18, 2018
1 parent c753266 commit 7aa375c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions bindings/ocaml/llvm/llvm.ml
Original file line number Diff line number Diff line change
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 bindings/ocaml/llvm/llvm.mli
Original file line number Diff line number Diff line change
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 bindings/ocaml/llvm/llvm_ocaml.c
Original file line number Diff line number Diff line change
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 include/llvm-c/Core.h
Original file line number Diff line number Diff line change
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 7aa375c

Please sign in to comment.