mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:16:37 +00:00

In https://reviews.llvm.org/D89072 I added static const data members to the debug subsection for globals. It skipped emitting an S_CONSTANT if it didn't have a value, which meant the subsection could be empty. This patch fixes the empty subsection issue. Differential Revision: https://reviews.llvm.org/D92049
21 lines
519 B
ArmAsm
21 lines
519 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
|
|
# RUN: lld-link /entry:main /debug /out:%t.exe %t.obj 2>&1 | FileCheck %s
|
|
|
|
# CHECK: warning: empty symbols subsection
|
|
|
|
.globl main
|
|
.Lfunc_begin0:
|
|
main:
|
|
xorl %eax, %eax
|
|
retq
|
|
.Lfunc_end0:
|
|
|
|
.section .debug$S,"dr"
|
|
.p2align 2
|
|
.long 4 # Debug section magic
|
|
.long 241 # Symbol subsection for globals
|
|
.long .Ltmp5-.Ltmp4 # Subsection size
|
|
.Ltmp4:
|
|
.Ltmp5:
|