aboutsummaryrefslogtreecommitdiffstats
path: root/test/Bindings/OCaml/transform_utils.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/Bindings/OCaml/transform_utils.ml')
-rw-r--r--test/Bindings/OCaml/transform_utils.ml21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Bindings/OCaml/transform_utils.ml b/test/Bindings/OCaml/transform_utils.ml
new file mode 100644
index 0000000..6b46df1
--- /dev/null
+++ b/test/Bindings/OCaml/transform_utils.ml
@@ -0,0 +1,21 @@
+(* 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 ()