[PATCH] D109970: [DebugInfo] Support DW_AT_defaulted

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 17 08:29:44 PDT 2021


probinson created this revision.
probinson added reviewers: dblaikie, aprantl.
probinson added a project: debug-info.
Herald added subscribers: dexonsmith, hiraditya.
probinson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

DWARF v5 added the DW_AT_defaulted attribute, which describes whether
a C++ subprogram has `= default` on its in-class or an out-of-class
declaration.  Pass this info to LLVM for the special member functions,
and have LLVM emit the attribute.

The metadata encoding doesn't permit distinguishing between "not defaulted"
and older bitcode that doesn't describe the defaulted state, so we don't
emit "not defaulted" in the DWARF.


https://reviews.llvm.org/D109970

Files:
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/test/CodeGenCXX/debug-info-deleted-defaulted.cpp
  clang/test/CodeGenCXX/debug-info-deleted.cpp
  llvm/include/llvm/IR/DebugInfoFlags.def
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  llvm/lib/IR/DebugInfoMetadata.cpp
  llvm/test/DebugInfo/X86/DW_AT_defaulted.s
  llvm/test/DebugInfo/X86/DW_AT_deleted.ll
  llvm/test/DebugInfo/X86/DW_AT_deleted_defaulted.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109970.373233.patch
Type: text/x-patch
Size: 14873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210917/702537a1/attachment.bin>


More information about the llvm-commits mailing list