22 lines · plain
1(* RUN: rm -rf %t && mkdir -p %t && cp %s %t/transform_utils.ml2 * RUN: %ocamlc -g -w +A -package llvm.transform_utils -linkpkg %t/transform_utils.ml -o %t/executable3 * RUN: %t/executable4 * RUN: %ocamlopt -g -w +A -package llvm.transform_utils -linkpkg %t/transform_utils.ml -o %t/executable5 * RUN: %t/executable6 * XFAIL: vg_leak7 *)8 9open Llvm10open Llvm_transform_utils11 12let context = global_context ()13 14let test_clone_module () =15 let m = create_module context "mod" in16 let m' = clone_module m in17 if m == m' then failwith "m == m'";18 if string_of_llmodule m <> string_of_llmodule m' then failwith "string_of m <> m'"19 20let () =21 test_clone_module ()22