summaryrefslogtreecommitdiff
path: root/test/Bindings
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2015-02-06 13:42:03 +0000
committerPeter Zotov <whitequark@whitequark.org>2015-02-06 13:42:03 +0000
commitf6943689d2ac302e54087a180cf468b29aa8d938 (patch)
tree68ec7f9dc68c41912bd78cf55c36b39ffe4850a2 /test/Bindings
parent52e57900a311eac02f6cfec7572e53175fdb1311 (diff)
[OCaml] Add Llvm.build_empty_phi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bindings')
-rw-r--r--test/Bindings/OCaml/core.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Bindings/OCaml/core.ml b/test/Bindings/OCaml/core.ml
index 0f3daac5bfd..c5e47e79cf2 100644
--- a/test/Bindings/OCaml/core.ml
+++ b/test/Bindings/OCaml/core.ml
@@ -1428,6 +1428,15 @@ let test_builder () =
add_incoming (p2, b2) phi;
insist ([(p1, b1); (p2, b2)] = incoming phi);
+ (* CHECK: %PhiEmptyNode = phi i8
+ *)
+ let phi_empty = build_empty_phi i8_type "PhiEmptyNode" at_jb in
+ insist ([] = incoming phi_empty);
+
+ (* can't emit an empty phi to bitcode *)
+ add_incoming (const_int i8_type 1, b1) phi_empty;
+ add_incoming (const_int i8_type 2, b2) phi_empty;
+
ignore (build_unreachable at_jb);
end