aboutsummaryrefslogtreecommitdiffstats
path: root/test/Bindings/OCaml/core.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/Bindings/OCaml/core.ml')
-rw-r--r--test/Bindings/OCaml/core.ml17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/Bindings/OCaml/core.ml b/test/Bindings/OCaml/core.ml
index c08351e..c5e47e7 100644
--- a/test/Bindings/OCaml/core.ml
+++ b/test/Bindings/OCaml/core.ml
@@ -1146,7 +1146,7 @@ let test_builder () =
(* CHECK: %dbg = add i32 %P1, %P2, !dbg !2
* !2 is metadata emitted at EOF.
*)
- insist ((current_debug_location atentry) = None);
+ insist ((current_debug_location atentry) = Some (mdnode context [||]));
let m_line = const_int i32_type 2 in
let m_col = const_int i32_type 3 in
@@ -1428,15 +1428,24 @@ 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
(* End-of-file checks for things like metdata and attributes.
* CHECK: attributes #0 = {{.*}}uwtable{{.*}}
* CHECK: !llvm.module.flags = !{!0}
- * CHECK: !0 = metadata !{i32 1, metadata !"Debug Info Version", i32 2}
- * CHECK: !1 = metadata !{i32 1, metadata !"metadata test"}
- * CHECK: !2 = metadata !{i32 2, i32 3, metadata !3, metadata !3}
+ * CHECK: !0 = !{i32 1, !"Debug Info Version", i32 2}
+ * CHECK: !1 = !{i32 1, !"metadata test"}
+ * CHECK: !2 = !MDLocation(line: 2, column: 3, scope: !3, inlinedAt: !3)
*)
(*===-- Pass Managers -----------------------------------------------------===*)