llvm-project
71 строка · 2.1 Кб
1# REQUIRES: x86
2# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
3# RUN: lld-link %t.obj -out:%t.exe -pdb:%t.pdb -debug -entry:main -subsystem:console
4# RUN: llvm-pdbutil dump -publics %t.pdb | FileCheck %s
5
6# Check that there are no __prof[dc] or __covrec public symbols.
7
8# CHECK-NOT: __profd
9# CHECK-NOT: __profc
10# CHECK-NOT: __covrec
11# CHECK: S_PUB32 {{.*}} `main`
12# CHECK-NOT: __profd
13# CHECK-NOT: __profc
14# CHECK-NOT: __covrec
15
16
17# The following assembly is simplified from this C code:
18# int main() {
19# return 0;
20# }
21
22# Compiled like so:
23# clang-cl -c pgo-pubs.c -fprofile-instr-generate -fcoverage-mapping -clang:-save-temps
24
25
26.text
27.intel_syntax noprefix
28.globl main # -- Begin function main
29main: # @main
30# %bb.0: # %entry
31xor eax, eax
32ret
33
34.section .lcovfun$M,"dr",discard,__covrec_DB956436E78DD5FAu
35.globl __covrec_DB956436E78DD5FAu # @__covrec_DB956436E78DD5FAu
36.p2align 3
37__covrec_DB956436E78DD5FAu:
38.quad -2624081020897602054 # 0xdb956436e78dd5fa
39.long 9 # 0x9
40.quad 24 # 0x18
41.quad 2164039332547799183 # 0x1e08364eb07c288f
42.ascii "\001\001\000\001\001\b\f\002\002"
43
44.section .lcovmap$M,"dr"
45.p2align 3 # @__llvm_coverage_mapping
46.L__llvm_coverage_mapping:
47.long 0 # 0x0
48.long 40 # 0x28
49.long 0 # 0x0
50.long 5 # 0x5
51.ascii "\002%\000\031C:\\src\\llvm-project\\build\npgo-pubs.i"
52
53.section .lprfc$M,"dw"
54.p2align 3 # @__profc_main
55__profc_main:
56.zero 8
57
58.section .lprfd$M,"dw"
59.p2align 3 # @__profd_main
60__profd_main:
61.quad -2624081020897602054 # 0xdb956436e78dd5fa
62.quad 24 # 0x18
63.quad __profc_main
64.quad main
65.quad 0
66.long 1 # 0x1
67.zero 4
68
69.section .lprfn$M,"dr"
70.L__llvm_prf_nm: # @__llvm_prf_nm
71.ascii "\004\000main"
72