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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 11:11:56 PDT 2025


dwblaikie wrote:

I know this scoping local non-instance specific entities work has/continues to be a long, arduous, journey... but I'm not sure this particular step is right.

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). 

Because function local entities may need to go inside scopes inside functions - and declarations don't have scopes, definitions do. Then those abstract scopes can be referenced from concrete/inlined scopes to attach the specific instruction ranges to them, over which the local name will be valid.

Does this make sense? Is there some alternative?

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


More information about the llvm-commits mailing list