X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=bindings%2Focaml%2Fbitwriter%2Fbitwriter_ocaml.c;h=f20fd59fd31afc80cfa24f3770315cdc01cc11c0;hp=1045c2344a70f5978345ec7869d0b33aa41a50a4;hb=a226572e59f8a270a90bfa6100c891cccf1af244;hpb=e3227ca292d81c587c8db62b761a24b21ff12ccf diff --git a/bindings/ocaml/bitwriter/bitwriter_ocaml.c b/bindings/ocaml/bitwriter/bitwriter_ocaml.c index 1045c2344a7..f20fd59fd31 100644 --- a/bindings/ocaml/bitwriter/bitwriter_ocaml.c +++ b/bindings/ocaml/bitwriter/bitwriter_ocaml.c @@ -43,3 +43,8 @@ CAMLprim value llvm_write_bitcode_to_fd(value U, LLVMModuleRef M, value FD) { Result = LLVMWriteBitcodeToFD(M, Int_val(FD), 0, Unbuffered); return Val_bool(Result == 0); } + +/* Llvm.llmodule -> Llvm.llmemorybuffer */ +CAMLprim LLVMMemoryBufferRef llvm_write_bitcode_to_memory_buffer(LLVMModuleRef M) { + return LLVMWriteBitcodeToMemoryBuffer(M); +}