summaryrefslogtreecommitdiffstats
path: root/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2014-10-29 08:16:01 +0000
committerPeter Zotov <whitequark@whitequark.org>2014-10-29 08:16:01 +0000
commit5f28729c61232e7a941e320f9e6985112d5bf6bd (patch)
tree136f50bf3996f52ab52c95acd1d80faca6ac96fc /llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
parent662538ac404c94ddfb92bd9def67d0e5034b45ec (diff)
downloadbcm5719-llvm-5f28729c61232e7a941e320f9e6985112d5bf6bd.tar.gz
bcm5719-llvm-5f28729c61232e7a941e320f9e6985112d5bf6bd.zip
[OCaml] Expose Llvm_bitwriter.write_bitcode_to_memory_buffer.
llvm-svn: 220844
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