1 ; RUN: llvm-link %s %S/Inputs/distinct.ll -o - -S | FileCheck %s
3 ; Test that distinct nodes from other modules remain distinct. The @global
4 ; cases are the most interesting, since the operands actually need to be
7 ; CHECK: @global = linkonce global i32 0
8 @global = linkonce global i32 0
9 ; Add an external reference to @global so that it gets linked in.
10 @alias = alias i32, i32* @global
12 ; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !0, !1, !2, !9, !10, !11, !12, !13, !14}
13 !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
16 ; CHECK-NEXT: !1 = !{!0}
17 ; CHECK-NEXT: !2 = !{i32* @global}
18 ; CHECK-NEXT: !3 = distinct !{}
19 ; CHECK-NEXT: !4 = distinct !{!0}
20 ; CHECK-NEXT: !5 = distinct !{i32* @global}
21 ; CHECK-NEXT: !6 = !{!3}
22 ; CHECK-NEXT: !7 = !{!4}
23 ; CHECK-NEXT: !8 = !{!5}
24 ; CHECK-NEXT: !9 = distinct !{}
25 ; CHECK-NEXT: !10 = distinct !{!0}
26 ; CHECK-NEXT: !11 = distinct !{i32* @global}
27 ; CHECK-NEXT: !12 = !{!9}
28 ; CHECK-NEXT: !13 = !{!10}
29 ; CHECK-NEXT: !14 = !{!11}
36 !5 = distinct !{i32* @global}