mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
0a248bf714
- Workaround for ocamlopt producing outputs adjacent to its source inputs, by having the tests copy the inputs into temporary directories in the output paths before building. - Patch by edward-san. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189081 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
716 B
OCaml
21 lines
716 B
OCaml
(* 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
|
|
* 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 _ -> ();;
|