diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-10-07 17:31:42 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-10-07 17:31:42 +0000 |
commit | c84c16be9b29b4f805b92bfc2d93e2dfaa952f8f (patch) | |
tree | b1151b7c8c7899327eda9b24b4903fd8b067f442 /bindings/ocaml/llvm/llvm_ocaml.c | |
parent | f16c595252de363e0e1f6895a5a626bc30017053 (diff) |
C and Objective Caml bindings for GlobalVariable::isConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42736 91177308-0d34-0410-b5e6-96231b3b80d8
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 4d721822f1..61115f2c19 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -445,6 +445,17 @@ CAMLprim value llvm_set_thread_local(value IsThreadLocal, return Val_unit; } +/* llvalue -> bool */ +CAMLprim value llvm_is_global_constant(LLVMValueRef GlobalVar) { + return Val_bool(LLVMIsGlobalConstant(GlobalVar)); +} + +/* bool -> llvalue -> unit */ +CAMLprim value llvm_set_global_constant(value Flag, LLVMValueRef GlobalVar) { + LLVMSetGlobalConstant(GlobalVar, Bool_val(Flag)); + return Val_unit; +} + /*--... Operations on functions ............................................--*/ /* string -> lltype -> llmodule -> llvalue */ |