(* RUN: cp %s %T/core.ml
- * RUN: %ocamlc -g -warn-error A -package llvm.analysis -package llvm.bitwriter -linkpkg %T/core.ml -o %t
+ * RUN: %ocamlc -g -w +A -package llvm.analysis -package llvm.bitwriter -linkpkg %T/core.ml -o %t
* RUN: %t %t.bc
- * RUN: %ocamlopt -g -warn-error A -package llvm.analysis -package llvm.bitwriter -linkpkg %T/core.ml -o %t
+ * RUN: %ocamlopt -g -w +A -package llvm.analysis -package llvm.bitwriter -linkpkg %T/core.ml -o %t
* RUN: %t %t.bc
* RUN: llvm-dis < %t.bc > %t.ll
* RUN: FileCheck %s < %t.ll
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 = !{i32 1, !"Debug Info Version", i32 2}
+ * CHECK: !0 = !{i32 1, !"Debug Info Version", i32 3}
* CHECK: !1 = !{i32 1, !"metadata test"}
- * CHECK: !2 = !{i32 2, i32 3, !3, !3}
+ * CHECK: !2 = !DILocation(line: 2, column: 3, scope: !3, inlinedAt: !3)
*)
(*===-- Pass Managers -----------------------------------------------------===*)