[all-commits] [llvm/llvm-project] d7cd20: [DebugInfo] Add an attribute to force type info to...

Amy Huang via All-commits all-commits at lists.llvm.org
Fri Mar 12 12:30:34 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7cd208f08afca450484be97604a55704a628e88
      https://github.com/llvm/llvm-project/commit/d7cd208f08afca450484be97604a55704a628e88
  Author: Amy Huang <akhuang at google.com>
  Date:   2021-03-12 (Fri, 12 Mar 2021)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/lib/CodeGen/CGDebugInfo.cpp
    A clang/test/CodeGenCXX/standalone-debug-attribute.cpp
    M clang/test/Misc/pragma-attribute-supported-attributes-list.test
    A clang/test/Sema/attr-standalonedebug.cpp

  Log Message:
  -----------
  [DebugInfo] Add an attribute to force type info to be emitted for types that are required to be complete.

This was motivated by the fact that constructor type homing (debug info
optimization that we want to turn on by default) drops some libc++ types,
so an attribute would allow us to override constructor homing and emit
them anyway. I'm currently looking into the particular libc++ issue, but
even if we do fix that, this issue might come up elsewhere and it might be
nice to have this.

As I've implemented it now, the attribute isn't specific to the
constructor homing optimization and overrides all of the debug info
optimizations.

Open to discussion about naming, specifics on what the attribute should do, etc.

Differential Revision: https://reviews.llvm.org/D97411




More information about the All-commits mailing list