xref: /aosp_15_r20/external/llvm/test/Linker/unique-fwd-decl-order.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link %s %S/Inputs/unique-fwd-decl-order.ll -S -o - | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link %S/Inputs/unique-fwd-decl-order.ll %s -S -o - | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; This test exercises MDNode hashing.  For the nodes to be correctly uniqued,
5*9880d681SAndroid Build Coastguard Worker; the hash of a to-be-created MDNode has to match the hash of an
6*9880d681SAndroid Build Coastguard Worker; operand-just-changed MDNode (with the same operands).
7*9880d681SAndroid Build Coastguard Worker;
8*9880d681SAndroid Build Coastguard Worker; Note that these two assembly files number the nodes identically, even though
9*9880d681SAndroid Build Coastguard Worker; the nodes are in a different order.  This is for the reader's convenience.
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; CHECK: !named = !{!0, !0}
12*9880d681SAndroid Build Coastguard Worker!named = !{!0}
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; CHECK: !0 = !{!1}
15*9880d681SAndroid Build Coastguard Worker!0 = !{!1}
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker; CHECK: !1 = !{}
18*9880d681SAndroid Build Coastguard Worker!1 = !{}
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: !2
21