2013-08-23 00:55:32 +00:00
|
|
|
(* RUN: rm -rf %t.builddir
|
|
|
|
* RUN: mkdir -p %t.builddir
|
|
|
|
* RUN: cp %s %t.builddir
|
|
|
|
* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitreader.cmxa llvm_executionengine.cmxa %t.builddir/ext_exc.ml -o %t
|
2010-12-23 15:49:26 +00:00
|
|
|
* RUN: %t </dev/null
|
2010-12-23 21:22:09 +00:00
|
|
|
* XFAIL: vg_leak
|
2010-12-23 15:49:26 +00:00
|
|
|
*)
|
|
|
|
let context = Llvm.global_context ()
|
|
|
|
(* this used to crash, we must not use 'external' in .mli files, but 'val' if we
|
|
|
|
* want the let _ bindings executed, see http://caml.inria.fr/mantis/view.php?id=4166 *)
|
|
|
|
let _ =
|
|
|
|
try
|
|
|
|
ignore (Llvm_bitreader.get_module context (Llvm.MemoryBuffer.of_stdin ()))
|
|
|
|
with
|
|
|
|
Llvm_bitreader.Error _ -> ();;
|
|
|
|
let _ =
|
|
|
|
try
|
|
|
|
ignore (Llvm.MemoryBuffer.of_file "/path/to/nonexistent/file")
|
|
|
|
with
|
|
|
|
Llvm.IoError _ -> ();;
|