[clang] [llvm] Reland "[DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)" (PR #165032)
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 3 12:57:14 PST 2026
================
@@ -538,55 +546,71 @@ class MetadataLoader::MetadataLoaderImpl {
/// Move local imports from DICompileUnit's 'imports' field to
/// DISubprogram's retainedNodes.
+ /// Move function-local enums from DICompileUnit's enums
+ /// to DISubprogram's retainedNodes.
----------------
dwblaikie wrote:
I think the functional change of moving function-local enums from the CU to the Subprogram seems like it could be a distinct change? It has observable effects (so it's not NFC) but they can be implemented/tested separately from the rest of this work.
Maybe worth discussing the tradeoffs of that change too (like what happens if that function-local enum is referenced from somewhere else, like a template instantiation but then the original function is optimized away (not sure if we could quite get the stars to align with all those things, but maybe)) - but I feel this has all drawn out far enough so if you just want to go ahead with this, you could separate out that work without it being in a separate patch/review/etc.
https://github.com/llvm/llvm-project/pull/165032
More information about the cfe-commits
mailing list