slightly increase prettiness.
[llvm/avr.git] / test / Bindings / Ocaml / bitwriter.ml
blob57caac7cb97d3241c1bacb829510f56ef5cdf9a0
1 (* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitwriter.cmxa %s -o %t
2 * RUN: ./%t %t.bc
3 * RUN: llvm-dis < %t.bc | grep caml_int_ty
4 *)
6 (* Note that this takes a moment to link, so it's best to keep the number of
7 individual tests low. *)
9 let context = Llvm.global_context ()
11 let test x = if not x then exit 1 else ()
13 let _ =
14 let m = Llvm.create_module context "ocaml_test_module" in
16 ignore (Llvm.define_type_name "caml_int_ty" (Llvm.i32_type context) m);
18 test (Llvm_bitwriter.write_bitcode_file m Sys.argv.(1))