[clang] fix emiision of nested unused enum types with -fno-eliminate-unused-d… (PR #137818)

Steve Merritt via cfe-commits cfe-commits at lists.llvm.org
Fri May 2 08:29:03 PDT 2025


================
@@ -1987,7 +1987,8 @@ void CGDebugInfo::CollectRecordFields(
 
         // Bump field number for next field.
         ++fieldNo;
-      } else if (CGM.getCodeGenOpts().EmitCodeView) {
+      } else if (CGM.getCodeGenOpts().hasMaybeUnusedDebugInfo() ||
+                 CGM.getCodeGenOpts().EmitCodeView) {
         // Debug info for nested types is included in the member list only for
----------------
stevemerr wrote:

Should update the comment as well.

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


More information about the cfe-commits mailing list