1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/test/Bindings/OCaml/transform_utils.ml
Peter Zotov a7ec66eea2 [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.
This way most code won't link this (substantially large) library,
if compiled statically with LLVM.

llvm-svn: 223072
2014-12-01 19:50:39 +00:00

22 lines
607 B
OCaml

(* RUN: cp %s %T/transform_utils.ml
* RUN: %ocamlc -g -warn-error A -package llvm.transform_utils -linkpkg %T/transform_utils.ml -o %t
* RUN: %t
* RUN: %ocamlopt -g -warn-error 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 ()