diff options
Diffstat (limited to 'bindings/ocaml/llvm/llvm_ocaml.c')
-rw-r--r-- | bindings/ocaml/llvm/llvm_ocaml.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c index 3889f9276ccd..b4c47e7475e6 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -940,6 +940,17 @@ CAMLprim value llvm_set_linkage(value Linkage, LLVMValueRef Global) { return Val_unit; } +/* llvalue -> bool */ +CAMLprim value llvm_unnamed_addr(LLVMValueRef Global) { + return Val_bool(LLVMHasUnnamedAddr(Global)); +} + +/* bool -> llvalue -> unit */ +CAMLprim value llvm_set_unnamed_addr(value UseUnnamedAddr, LLVMValueRef Global) { + LLVMSetUnnamedAddr(Global, Bool_val(UseUnnamedAddr)); + return Val_unit; +} + /* llvalue -> string */ CAMLprim value llvm_section(LLVMValueRef Global) { return caml_copy_string(LLVMGetSection(Global)); |