source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Bindings/OCaml/ext_exc.ml @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 705 bytes
Line 
1(* RUN: cp %s %T/ext_exc.ml
2 * RUN: %ocamlc -g -w +A -package llvm.bitreader -linkpkg %T/ext_exc.ml -o %t
3 * RUN: %t
4 * RUN: %ocamlopt -g -w +A -package llvm.bitreader -linkpkg %T/ext_exc.ml -o %t
5 * RUN: %t
6 * XFAIL: vg_leak
7 *)
8
9let context = Llvm.global_context ()
10
11(* this used to crash, we must not use 'external' in .mli files, but 'val' if we
12 * want the let _ bindings executed, see http://caml.inria.fr/mantis/view.php?id=4166 *)
13let _ =
14    try
15        ignore (Llvm_bitreader.get_module context (Llvm.MemoryBuffer.of_stdin ()))
16    with
17    Llvm_bitreader.Error _ -> ();;
18let _ =
19    try
20        ignore (Llvm.MemoryBuffer.of_file "/path/to/nonexistent/file")
21    with
22    Llvm.IoError _ -> ();;
Note: See TracBrowser for help on using the repository browser.