[PATCH] D52198: [OCaml] Add GlobalIFunc value kind to OCaml API
Josh Berdine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 16:31:53 PDT 2018
jberdine created this revision.
jberdine added a reviewer: whitequark.
Herald added a reviewer: deadalnix.
Herald added a subscriber: llvm-commits.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D52198
Files:
bindings/ocaml/llvm/llvm.ml
bindings/ocaml/llvm/llvm.mli
bindings/ocaml/llvm/llvm_ocaml.c
include/llvm-c/Core.h
Index: include/llvm-c/Core.h
===================================================================
--- include/llvm-c/Core.h
+++ include/llvm-c/Core.h
@@ -1299,6 +1299,7 @@
macro(ConstantVector) \
macro(GlobalValue) \
macro(GlobalAlias) \
+ macro(GlobalIFunc) \
macro(GlobalObject) \
macro(Function) \
macro(GlobalVariable) \
Index: bindings/ocaml/llvm/llvm_ocaml.c
===================================================================
--- bindings/ocaml/llvm/llvm_ocaml.c
+++ bindings/ocaml/llvm/llvm_ocaml.c
@@ -619,6 +619,7 @@
ConstantVector,
Function,
GlobalAlias,
+ GlobalIFunc,
GlobalVariable,
UndefValue,
Instruction
@@ -654,6 +655,7 @@
if (LLVMIsAGlobalValue(Val)) {
DEFINE_CASE(Val, Function);
DEFINE_CASE(Val, GlobalAlias);
+ DEFINE_CASE(Val, GlobalIFunc);
DEFINE_CASE(Val, GlobalVariable);
}
DEFINE_CASE(Val, Argument);
Index: bindings/ocaml/llvm/llvm.mli
===================================================================
--- bindings/ocaml/llvm/llvm.mli
+++ bindings/ocaml/llvm/llvm.mli
@@ -343,6 +343,7 @@
| ConstantVector
| Function
| GlobalAlias
+ | GlobalIFunc
| GlobalVariable
| UndefValue
| Instruction of Opcode.t
Index: bindings/ocaml/llvm/llvm.ml
===================================================================
--- bindings/ocaml/llvm/llvm.ml
+++ bindings/ocaml/llvm/llvm.ml
@@ -310,6 +310,7 @@
| ConstantVector
| Function
| GlobalAlias
+ | GlobalIFunc
| GlobalVariable
| UndefValue
| Instruction of Opcode.t
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52198.165846.patch
Type: text/x-patch
Size: 1692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/3c6630fb/attachment.bin>
More information about the llvm-commits
mailing list