1; RUN: llvm-link %s %S/Inputs/distinct.ll -o - -S | FileCheck %s
2
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
5; remapped.
6
7; CHECK: @global = linkonce global i32 0
8@global = linkonce global i32 0
9
10; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !0, !1, !2, !9, !10, !11, !12, !13, !14}
11!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
12
13; CHECK:      !0 = !{}
14; CHECK-NEXT: !1 = !{!0}
15; CHECK-NEXT: !2 = !{i32* @global}
16; CHECK-NEXT: !3 = distinct !{}
17; CHECK-NEXT: !4 = distinct !{!0}
18; CHECK-NEXT: !5 = distinct !{i32* @global}
19; CHECK-NEXT: !6 = !{!3}
20; CHECK-NEXT: !7 = !{!4}
21; CHECK-NEXT: !8 = !{!5}
22; CHECK-NEXT: !9 = distinct !{}
23; CHECK-NEXT: !10 = distinct !{!0}
24; CHECK-NEXT: !11 = distinct !{i32* @global}
25; CHECK-NEXT: !12 = !{!9}
26; CHECK-NEXT: !13 = !{!10}
27; CHECK-NEXT: !14 = !{!11}
28; CHECK-NOT:  !
29!0 = !{}
30!1 = !{!0}
31!2 = !{i32* @global}
32!3 = distinct !{}
33!4 = distinct !{!0}
34!5 = distinct !{i32* @global}
35!6 = !{!3}
36!7 = !{!4}
37!8 = !{!5}
38