llvm-6502/test/Bindings/Ocaml/ext_exc.ml
Peter Zotov d1fc3a020d [OCaml] Enable backtraces in tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220900 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 08:29:57 +00:00

21 lines
625 B
OCaml

(* RUN: cp %s %T/ext_exc.ml
* RUN: %ocamlcomp -g -warn-error A -package llvm.bitreader -linkpkg %T/ext_exc.ml -o %t
* RUN: %t
* XFAIL: vg_leak
*)
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 _ -> ();;