aboutsummaryrefslogtreecommitdiff
path: root/test/Bindings/Ocaml/ext_exc.ml
blob: b4d2e6dc64141df56bc8fd1b9486bc64a8139f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_bitreader.cmxa llvm_executionengine.cmxa %s -o %t
 * RUN: %t </dev/null
 * 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 _ -> ();;