diff options
Diffstat (limited to 'bindings/ocaml/analysis/analysis_ocaml.c')
-rw-r--r-- | bindings/ocaml/analysis/analysis_ocaml.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bindings/ocaml/analysis/analysis_ocaml.c b/bindings/ocaml/analysis/analysis_ocaml.c index 91be2d3..44e3197 100644 --- a/bindings/ocaml/analysis/analysis_ocaml.c +++ b/bindings/ocaml/analysis/analysis_ocaml.c @@ -20,15 +20,14 @@ #include "caml/mlvalues.h" #include "caml/memory.h" - /* Llvm.llmodule -> string option */ CAMLprim value llvm_verify_module(LLVMModuleRef M) { CAMLparam0(); CAMLlocal2(String, Option); - + char *Message; int Result = LLVMVerifyModule(M, LLVMReturnStatusAction, &Message); - + if (0 == Result) { Option = Val_int(0); } else { @@ -36,9 +35,9 @@ CAMLprim value llvm_verify_module(LLVMModuleRef M) { String = copy_string(Message); Store_field(Option, 0, String); } - + LLVMDisposeMessage(Message); - + CAMLreturn(Option); } |