[PR2886] Ignore stderr from ocamlc since it prints unresolvable warnings on some...
[oota-llvm.git] / test / Bindings / Ocaml / bitwriter.ml
1 (* RUN: %ocamlc -warn-error A llvm.cma llvm_bitwriter.cma %s -o %t 2> /dev/null
2  * RUN: ./%t %t.bc
3  * RUN: llvm-dis < %t.bc | grep caml_int_ty
4  *)
5
6 (* Note that this takes a moment to link, so it's best to keep the number of
7    individual tests low. *)
8
9 let test x = if not x then exit 1 else ()
10
11 let _ =
12   let m = Llvm.create_module "ocaml_test_module" in
13   
14   ignore (Llvm.define_type_name "caml_int_ty" Llvm.i32_type m);
15   
16   test (Llvm_bitwriter.write_bitcode_file m Sys.argv.(1))