llvm-project
45 строк · 951.0 Байт
1# REQUIRES: x86
2
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
8
9.section .text,"ax", one_only, D
10D:
11retq
12
13.section .text,"ax", one_only, C
14.globl C
15C:
16retq
17
18.section .text,"ax", one_only, B
19.globl B
20B:
21retq
22
23.section .text,"ax", one_only, A
24.globl A
25A:
26Aa:
27retq
28
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
35
36# CHECK: 140001000 T A
37# CHECK: 140001001 T B
38# CHECK: 140001002 T C
39# CHECK: 140001003 t D
40
41
42# NO-CG: 140001000 t D
43# NO-CG: 140001001 T C
44# NO-CG: 140001002 T B
45# NO-CG: 140001003 T A
46