[PATCH] D78778: Add SupportsDebugUnwindInformation to MCAsmInfo

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 18:30:11 PDT 2020


scott.linder created this revision.
Herald added subscribers: llvm-commits, hiraditya, aprantl, mgorny.
Herald added a project: LLVM.
scott.linder added a parent revision: D76877: Implement DW_CFA_LLVM_def_cfa_aspace.
scott.linder added a child revision: D76878: Implement new DW_OP_LLVM_* operations.

Generating unwind information is entangled with supporting exceptions,
even when AsmPrinter explicitly recognizes that the unwind tables are
being generated only as debug information.

Add SupportsDebugUnwindInformation as a workaround for targets which do
not have EH support but which do support unwind information for
debugging. This new option only has an effect when the `None` EH model
is specified. The option requests that .debug_frame be generated when
debug info is requested.

Add a new AsmPrinterHandler called UnwindStreamer which just ensures the
proper .cfi_sections and .cfi_startproc/.cfi_endproc directives are
emitted when the option is in effect. This duplicates trivial amounts of
DwarfException, but not enough to make factoring it out helpful.

In the future this could be unified/simplified with the existing EH
support if debug handling is made orthogonal to unwind information
generation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78778

Files:
  llvm/include/llvm/MC/MCAsmInfo.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
  llvm/lib/CodeGen/AsmPrinter/UnwindStreamer.cpp
  llvm/lib/CodeGen/AsmPrinter/UnwindStreamer.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78778.259767.patch
Type: text/x-patch
Size: 6497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200424/41512f81/attachment.bin>


More information about the llvm-commits mailing list