aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/ocaml
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ocaml')
-rw-r--r--bindings/ocaml/llvm/llvm.ml1
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml
index d69487a..92c60c4 100644
--- a/bindings/ocaml/llvm/llvm.ml
+++ b/bindings/ocaml/llvm/llvm.ml
@@ -119,6 +119,7 @@ external define_type_name : string -> lltype -> llmodule -> bool
= "llvm_add_type_name"
external delete_type_name : string -> llmodule -> unit
= "llvm_delete_type_name"
+external dump_module : llmodule -> unit = "llvm_dump_module"
(*===-- Types -------------------------------------------------------------===*)
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c
index f4e958d..ebe09dc 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -98,6 +98,12 @@ CAMLprim value llvm_delete_type_name(value Name, LLVMModuleRef M) {
return Val_unit;
}
+/* llmodule -> unit */
+CAMLprim value llvm_dump_module(LLVMModuleRef M) {
+ LLVMDumpModule(M);
+ return Val_unit;
+}
+
/*===-- Types -------------------------------------------------------------===*/