[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #142166)

Jeremy Morse via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 9 02:42:31 PDT 2025


jmorse wrote:

(Transparency, I wrote some of the code in the PR so dunno if I should review it,)

> I /think/ function-local types need to go in definitions - in /abstract/ definitions if they exist (not in the inlined instances or concrete out of line instances).

I think this highlights the difference in my thinking -- I've been treating "declaration" DISubprograms like they're actually "abstract" DISubprograms (they're very similar in my mind). As far as I'm aware we don't have any entities in LLVM-IR metadata to represent abstract DISubprograms, and from `DwarfCompileUnit::constructAbstractSubprogramScopeDIE` it looks like we just construct them on-the-fly when they become necessary. Would you see having a `DIAbstractSubprogram` metadata node, or a new subprogram flag, as being the correct refinement?

https://github.com/llvm/llvm-project/pull/142166


More information about the cfe-commits mailing list