mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-07 04:21:39 +00:00
42187d2c00
Specifically: * Directories match module names. * Test names match module names. * The language is called "OCaml", not "Ocaml". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220958 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
625 B
OCaml
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 _ -> ();;
|