llvm-project/lld/test/COFF/gc-dwarf-eh.s
Jon Roelofs d506aa4edf
Reland "[MC][AsmParser] Diagnose improperly nested .cfi frames"
This showed up when simplifying some large testcase, where the cfi directives
became out of sync with the proc's they enclose.

Now restricted to platforms that support .subsections_via_symbols.

This reverts commit 797b68c0ba699994e1038ac33d3083541482bf19.

Fixes: #72802

Differential revision: https://reviews.llvm.org/D153167

rdar://111459507
2023-11-21 10:33:11 -08:00

37 lines
909 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -lldmap:%t.map -out:%t.exe -opt:ref -entry:main %t.obj -verbose 2>&1 | FileCheck %s
# RUN: FileCheck %s --check-prefix=MAP --input-file=%t.map
# CHECK: Discarded _unused
# MAP: In Symbol
# MAP: gc-dwarf-eh.s.tmp.obj:(.text)
# MAP: {{ ___gxx_personality_v0$}}
.def _main; .scl 2; .type 32; .endef
.section .text,"xr",one_only,_main
.globl _main
_main:
.cfi_startproc
.cfi_personality 0, ___gxx_personality_v0
xorl %eax, %eax
ret
.cfi_endproc
.def ___gxx_personality_v0; .scl 2; .type 32; .endef
.section .text,"xr",one_only,___gxx_personality_v0
.globl ___gxx_personality_v0
___gxx_personality_v0:
ret
.def _unused; .scl 2; .type 32; .endef
.section .text,"xr",one_only,_unused
.globl _unused
_unused:
.cfi_startproc
.cfi_personality 0, ___gxx_personality_v0
ret
.cfi_endproc