diff --git a/bindings/ocaml/bitreader/bitreader_ocaml.c b/bindings/ocaml/bitreader/bitreader_ocaml.c index 5fd9f854d9d..318c7038e21 100644 --- a/bindings/ocaml/bitreader/bitreader_ocaml.c +++ b/bindings/ocaml/bitreader/bitreader_ocaml.c @@ -56,7 +56,7 @@ CAMLprim value llvm_get_module_provider(LLVMContextRef C, if (LLVMGetBitcodeModuleProviderInContext(C, MemBuf, &MP, &Message)) llvm_raise(llvm_bitreader_error_exn, Message); - CAMLreturn((value) MemBuf); + CAMLreturn((value) MP); } /* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */