ext_exc.ml revision a156efdf71bc668093e31593713694cf076db895
1(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitreader.cmxa llvm_executionengine.cmxa %s -o %t
2 * RUN: %t </dev/null
3 *)
4let context = Llvm.global_context ()
5(* this used to crash, we must not use 'external' in .mli files, but 'val' if we
6 * want the let _ bindings executed, see http://caml.inria.fr/mantis/view.php?id=4166 *)
7let _ =
8    try
9        ignore (Llvm_bitreader.get_module context (Llvm.MemoryBuffer.of_stdin ()))
10    with
11    Llvm_bitreader.Error _ -> ();;
12let _ =
13    try
14        ignore (Llvm.MemoryBuffer.of_file "/path/to/nonexistent/file")
15    with
16    Llvm.IoError _ -> ();;
17