aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorykhatav <yashasvi.khatavkar@intel.com>2025-05-13 11:29:53 -0400
committerGitHub <noreply@github.com>2025-05-13 11:29:53 -0400
commit3cf280c16aaf93148db9080a47f24ac76c01bde4 (patch)
treec81c7566fe4c28cd13381c1f1310dd5f22530ab4 /clang/lib/CodeGen/CodeGenModule.cpp
parentf4b80b9109a65bd85f1f62d47cfc9f9395e1b5cc (diff)
downloadllvm-3cf280c16aaf93148db9080a47f24ac76c01bde4.zip
llvm-3cf280c16aaf93148db9080a47f24ac76c01bde4.tar.gz
llvm-3cf280c16aaf93148db9080a47f24ac76c01bde4.tar.bz2
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
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<VarDecl>(I) || isa<CXXRecordDecl>(I))
+ if (isa<VarDecl>(I) || isa<CXXRecordDecl>(I) || isa<EnumDecl>(I))
EmitTopLevelDecl(I);
break;
}