llvm-6502/test/Bindings/OCaml/transform_utils.ml
Peter Zotov 7b9a628414 [OCaml] Do not use -warn-error in tests.
This -warn-error flag invariably gets into release tarballs
and breaks builds on distributions that run tests as a part
of release process. The OCaml binding tests are especially
critical, since they often expose lingering toolchain bugs,
and so it is replaced with -w +A (equivalent to -Wall).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242550 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-17 17:33:23 +00:00

22 lines
591 B
OCaml

(* RUN: cp %s %T/transform_utils.ml
* RUN: %ocamlc -g -w +A -package llvm.transform_utils -linkpkg %T/transform_utils.ml -o %t
* RUN: %t
* RUN: %ocamlopt -g -w +A -package llvm.transform_utils -linkpkg %T/transform_utils.ml -o %t
* RUN: %t
* XFAIL: vg_leak
*)
open Llvm
open Llvm_transform_utils
let context = global_context ()
let test_clone_module () =
let m = create_module context "mod" in
let m' = clone_module m in
if m == m' then failwith "m == m'";
if string_of_llmodule m <> string_of_llmodule m' then failwith "string_of m <> m'"
let () =
test_clone_module ()