(* RUN: rm -rf %t && mkdir -p %t && cp %s %t/bitreader.ml
* RUN: %ocamlc -g -w +A -package llvm.bitreader -package llvm.bitwriter -linkpkg %t/bitreader.ml -o %t/executable
* RUN: %t/executable %t/bitcode.bc
* RUN: %ocamlopt -g -w +A -package llvm.bitreader -package llvm.bitwriter -linkpkg %t/bitreader.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 _ =
set_diagnostic_handler context ;
let fn = argv. in
let m = create_module context "ocaml_test_module" in
test ;
dispose_module m;
(* parse_bitcode *)
;
(* MemoryBuffer.of_file *)
test ;
(* get_module *)
;
(* corrupt the bitcode *)
let fn = fn ^ ".txt" in
;
(* test get_module exceptions *)
test