From 3cf280c16aaf93148db9080a47f24ac76c01bde4 Mon Sep 17 00:00:00 2001 From: ykhatav Date: Tue, 13 May 2025 11:29:53 -0400 Subject: Emit nested unused enum types with -fno-eliminate-unused-debug-types (#137818) Unused types are retained in the debug info when -fno-eliminate-unused-debug-types is specified. However, unused nested enums were not being emitted even with this option. This patch fixes the missing emission of unused nested enums with -fno-eliminate-unused-debug-types --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 428a4b8..50041f8 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -7119,7 +7119,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { } // Emit any static data members, they may be definitions. for (auto *I : CRD->decls()) - if (isa(I) || isa(I)) + if (isa(I) || isa(I) || isa(I)) EmitTopLevelDecl(I); break; } -- cgit v1.1