[LLD][COFF] Fix TypeServerSource matcher with more than one collision
[llvm-project.git] / lld / test / COFF / cgprofile-obj.s
blobb267850c46382c195cc3f7712d4fb2cf09554828
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t
4 # RUN: lld-link /subsystem:console /entry:A %t /out:%t2 /debug:symtab
5 # RUN: llvm-nm --numeric-sort %t2 | FileCheck %s
6 # RUN: lld-link /call-graph-profile-sort:no /subsystem:console /entry:A %t /out:%t3 /debug:symtab
7 # RUN: llvm-nm --numeric-sort %t3 | FileCheck %s --check-prefix=NO-CG
9 .section .text,"ax", one_only, D
11 retq
13 .section .text,"ax", one_only, C
14 .globl C
16 retq
18 .section .text,"ax", one_only, B
19 .globl B
21 retq
23 .section .text,"ax", one_only, A
24 .globl A
26 Aa:
27 retq
29 .cg_profile A, B, 10
30 .cg_profile A, B, 10
31 .cg_profile Aa, B, 80
32 .cg_profile A, C, 40
33 .cg_profile B, C, 30
34 .cg_profile C, D, 90
36 # CHECK: 140001000 T A
37 # CHECK: 140001001 T B
38 # CHECK: 140001002 T C
39 # CHECK: 140001003 t D
42 # NO-CG: 140001000 t D
43 # NO-CG: 140001001 T C
44 # NO-CG: 140001002 T B
45 # NO-CG: 140001003 T A