summaryrefslogtreecommitdiffstats
path: root/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2014-10-29 08:15:54 +0000
committerPeter Zotov <whitequark@whitequark.org>2014-10-29 08:15:54 +0000
commit662538ac404c94ddfb92bd9def67d0e5034b45ec (patch)
treed9c72364adb81b10779fb8f900720d9518027255 /llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
parente447b61c5036a7d0e3ff680ed46a9dfab33c431a (diff)
downloadbcm5719-llvm-662538ac404c94ddfb92bd9def67d0e5034b45ec.tar.gz
bcm5719-llvm-662538ac404c94ddfb92bd9def67d0e5034b45ec.zip
[OCaml] Drop support for 3.12.1 and earlier.
In practice this means: * Always using -g flag. * Embedding -cclib -lstdc++ into the corresponding cma/cmxa file. This also moves -lstdc++ in a single place. * Using caml_named_value instead of a homegrown mechanism. llvm-svn: 220843
Diffstat (limited to 'llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c')
-rw-r--r--llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c b/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
index a47f7003e7e..1045c2344a7 100644
--- a/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
+++ b/llvm/bindings/ocaml/bitwriter/bitwriter_ocaml.c
@@ -21,25 +21,25 @@
#include "caml/mlvalues.h"
#include "caml/memory.h"
-/*===-- Modules -----------------------------------------------------------===*/
+/*===-- BitWriter ---------------------------------------------------------===*/
/* Llvm.llmodule -> string -> bool */
-CAMLprim value llvm_write_bitcode_file(value M, value Path) {
- int res = LLVMWriteBitcodeToFile((LLVMModuleRef) M, String_val(Path));
- return Val_bool(res == 0);
+CAMLprim value llvm_write_bitcode_file(LLVMModuleRef M, value Path) {
+ int Result = LLVMWriteBitcodeToFile(M, String_val(Path));
+ return Val_bool(Result == 0);
}
/* ?unbuffered:bool -> Llvm.llmodule -> Unix.file_descr -> bool */
-CAMLprim value llvm_write_bitcode_to_fd(value U, value M, value FD) {
+CAMLprim value llvm_write_bitcode_to_fd(value U, LLVMModuleRef M, value FD) {
int Unbuffered;
- int res;
+ int Result;
if (U == Val_int(0)) {
Unbuffered = 0;
} else {
- Unbuffered = Bool_val(Field(U,0));
+ Unbuffered = Bool_val(Field(U, 0));
}
- res = LLVMWriteBitcodeToFD((LLVMModuleRef) M, Int_val(FD), 0, Unbuffered);
- return Val_bool(res == 0);
+ Result = LLVMWriteBitcodeToFD(M, Int_val(FD), 0, Unbuffered);
+ return Val_bool(Result == 0);
}
OpenPOWER on IntegriCloud