projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[OCaml] Expose Llvm_bitwriter.write_bitcode_to_memory_buffer.
[oota-llvm.git]
/
bindings
/
ocaml
/
bitwriter
/
bitwriter_ocaml.c
diff --git
a/bindings/ocaml/bitwriter/bitwriter_ocaml.c
b/bindings/ocaml/bitwriter/bitwriter_ocaml.c
index 1045c2344a70f5978345ec7869d0b33aa41a50a4..f20fd59fd31afc80cfa24f3770315cdc01cc11c0 100644
(file)
--- 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);
}
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);
+}