[PATCH] D70537: [clang] CGDebugInfo asserts `!DT.isNull()` when compiling with debug symbols

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 10:44:25 PST 2019


probinson added a comment.

@dblaikie let me reflect this back to make sure I get it:
Template members (methods or variables) would never appear in the *metadata* description of the struct; but metadata descriptions of the instances would refer back to that struct (as the scope for the instance).  Then DwarfDebug would paste them all together when emitting the DWARF description(s).  The in-struct child DIE could then have the deduced type because by the time the definition metadata is produced, we actually know what that type is.  This is okay because template data members are necessarily static; they don't affect size or layout of the struct in any way.

So, CGDebugInfo would skip basically any templated member when constructing the struct, but when the template is (finally, fully) instantiated, its definition could know everything it needs to, and point back to the struct.

Sounds reasonable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70537/new/

https://reviews.llvm.org/D70537





More information about the llvm-commits mailing list