aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/ocaml/llvm/llvm.ml
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-10-08 03:45:09 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-10-08 03:45:09 +0000
commita2ea75d0c826ffe712344055e874d65675953eb3 (patch)
tree01f0b3310d4b51e014b781cbf183bc225c00eee8 /bindings/ocaml/llvm/llvm.ml
parent116ceb4f1833ca30cc453f22442f2b50ec0bbd97 (diff)
downloadexternal_llvm-a2ea75d0c826ffe712344055e874d65675953eb3.zip
external_llvm-a2ea75d0c826ffe712344055e874d65675953eb3.tar.gz
external_llvm-a2ea75d0c826ffe712344055e874d65675953eb3.tar.bz2
C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
the Objective Caml 'declare_*' functions to behave more or less like getOrInsertFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/llvm/llvm.ml')
-rw-r--r--bindings/ocaml/llvm/llvm.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml
index 9766d83..779066b 100644
--- a/bindings/ocaml/llvm/llvm.ml
+++ b/bindings/ocaml/llvm/llvm.ml
@@ -277,6 +277,8 @@ external declare_global : lltype -> string -> llmodule -> llvalue
= "llvm_declare_global"
external define_global : string -> llvalue -> llmodule -> llvalue
= "llvm_define_global"
+external lookup_global : string -> llmodule -> llvalue option
+ = "llvm_lookup_global"
external delete_global : llvalue -> unit = "llvm_delete_global"
external global_initializer : llvalue -> llvalue = "LLVMGetInitializer"
external set_initializer : llvalue -> llvalue -> unit = "llvm_set_initializer"
@@ -289,6 +291,8 @@ external declare_function : string -> lltype -> llmodule -> llvalue
= "llvm_declare_function"
external define_function : string -> lltype -> llmodule -> llvalue
= "llvm_define_function"
+external lookup_function : string -> llmodule -> llvalue option
+ = "llvm_lookup_function"
external delete_function : llvalue -> unit = "llvm_delete_function"
external params : llvalue -> llvalue array = "llvm_params"
external param : llvalue -> int -> llvalue = "llvm_param"