Changeset View
Changeset View
Standalone View
Standalone View
test/Bindings/OCaml/transform_utils.ml
(* RUN: cp %s %T/transform_utils.ml | (* RUN: rm -rf %t && mkdir -p %t && cp %s %t/transform_utils.ml | ||||
* RUN: %ocamlc -g -w +A -package llvm.transform_utils -linkpkg %T/transform_utils.ml -o %t | * RUN: %ocamlc -g -w +A -package llvm.transform_utils -linkpkg %t/transform_utils.ml -o %t/executable | ||||
* RUN: %t | * RUN: %t/executable | ||||
* RUN: %ocamlopt -g -w +A -package llvm.transform_utils -linkpkg %T/transform_utils.ml -o %t | * RUN: %ocamlopt -g -w +A -package llvm.transform_utils -linkpkg %t/transform_utils.ml -o %t/executable | ||||
* RUN: %t | * RUN: %t/executable | ||||
* XFAIL: vg_leak | * XFAIL: vg_leak | ||||
*) | *) | ||||
open Llvm | open Llvm | ||||
open Llvm_transform_utils | open Llvm_transform_utils | ||||
let context = global_context () | let context = global_context () | ||||
let test_clone_module () = | let test_clone_module () = | ||||
let m = create_module context "mod" in | let m = create_module context "mod" in | ||||
let m' = clone_module m in | let m' = clone_module m in | ||||
if m == m' then failwith "m == m'"; | if m == m' then failwith "m == m'"; | ||||
if string_of_llmodule m <> string_of_llmodule m' then failwith "string_of m <> m'" | if string_of_llmodule m <> string_of_llmodule m' then failwith "string_of m <> m'" | ||||
let () = | let () = | ||||
test_clone_module () | test_clone_module () |