Emit unwind information in .debug_frame section when .cfi_sections .debug_frame intri...
authorShubham Sandeep Rastogi <srastogi22@apple.com>
Wed, 5 Apr 2023 16:05:06 +0000 (09:05 -0700)
committerShubham Sandeep Rastogi <srastogi22@apple.com>
Wed, 26 Apr 2023 23:19:53 +0000 (16:19 -0700)
commit710290cecce74da1368675ff3686a25037045246
treeb19304146f3deb89f78f0974046ede4eef4fd44e
parentfe8eab468eee18329922901bcf74310534e08b59
Emit unwind information in .debug_frame section when .cfi_sections .debug_frame intrinsic is used

The .cfi_sections .debug_frame intrinsic is used to emit .debug_frame
section. This directive tells the assembler to write out a section of
debug frame data. AArch64 is a platform where eh_frame is not needed for
unwind information. Unfortunately, that means that even when the
.cfi_sections .debug_frame intrinsic is used, the compiler skips
emitting the CIE's and FDE's in the debug_frame section. This patch
address that issue by making sure that the emission of CIE's and FDE's
are only skipped if the unwind information does not require a
debug_frame section and is a platform where the eh_frame can be skipped.

Differential Revision: https://reviews.llvm.org/D147980
llvm/lib/MC/MCDwarf.cpp
llvm/test/DebugInfo/AArch64/debugframeinfo.s [new file with mode: 0644]