(* RUN: rm -rf %t && mkdir -p %t && cp %s %t/bitwriter.ml
* RUN: %ocamlc -g -w -3 -w +A -package llvm.bitreader -package llvm.bitwriter -linkpkg %t/bitwriter.ml -o %t/executable
* RUN: %t/executable %t/bitcode.bc
* RUN: %ocamlopt -g -w -3 -w +A -package llvm.bitreader -package llvm.bitwriter -linkpkg %t/bitwriter.ml -o %t/executable
* RUN: %t/executable %t/bitcode.bc
* RUN: llvm-dis < %t/bitcode.bc
* XFAIL: vg_leak
*)
(* Note that this takes a moment to link, so it's best to keep the number of
individual tests low. *)
let context = global_context (
if not x then exit 1 else (
let ic = open_in_bin name in
let len = in_channel_length ic in
let buf = create len in
test ;
close_in ic;
buf
let temp_name, temp_oc = open_temp_file ~mode: "" "" in
test ;
flush temp_oc;
let temp_buf = read_file temp_name in
close_out temp_oc;
temp_buf
let _ =
let m = create_module context "ocaml_test_module" in
test ;
let file_buf = read_file argv. in
test ;
test ;
test ;
test