1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

[OCaml] Add Llvm.mdnull.

Patch by Gideon Smeding <gideon.smeding@3ds.com>.

llvm-svn: 223129
This commit is contained in:
Peter Zotov 2014-12-02 17:35:26 +00:00
parent f1f2d23cc4
commit a5a15255cc
3 changed files with 9 additions and 0 deletions

View File

@ -459,6 +459,7 @@ external clear_metadata : llvalue -> llmdkind -> unit = "llvm_clear_metadata"
(*--... Operations on metadata .......,.....................................--*)
external mdstring : llcontext -> string -> llvalue = "llvm_mdstring"
external mdnode : llcontext -> llvalue array -> llvalue = "llvm_mdnode"
external mdnull : llcontext -> llvalue = "llvm_mdnull"
external get_mdstring : llvalue -> string option = "llvm_get_mdstring"
external get_named_metadata : llmodule -> string -> llvalue array
= "llvm_get_namedmd"

View File

@ -819,6 +819,9 @@ val mdstring : llcontext -> string -> llvalue
See the method [llvm::MDNode::get]. *)
val mdnode : llcontext -> llvalue array -> llvalue
(** [mdnull c ] returns a null MDNode in context [c]. *)
val mdnull : llcontext -> llvalue
(** [get_mdstring v] returns the MDString.
See the method [llvm::MDString::getString] *)
val get_mdstring : llvalue -> string option

View File

@ -666,6 +666,11 @@ CAMLprim LLVMValueRef llvm_mdnode(LLVMContextRef C, value ElementVals) {
Wosize_val(ElementVals));
}
/* llcontext -> llvalue */
CAMLprim LLVMValueRef llvm_mdnull(LLVMContextRef C) {
return NULL;
}
/* llvalue -> string option */
CAMLprim value llvm_get_mdstring(LLVMValueRef V) {
CAMLparam0();