summaryrefslogtreecommitdiffstats
path: root/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c')
-rw-r--r--llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c b/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
index 1045c2344a7..f20fd59fd31 100644
--- a/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
+++ b/llvm/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);
+}
OpenPOWER on IntegriCloud