dblaikie added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3787-3788 (void)checkDebugInfoOption(A, Args, D, TC); if (DebugInfoKind == codegenoptions::LimitedDebugInfo && NeedFullDebug) DebugInfoKind = codegenoptions::FullDebugInfo; ---------------- Re: https://reviews.llvm.org/D80242#inline-783632 This is the spot that seems like the place to handle UnusedTypeInfo, with something like: ``` if (DebugInfoKind == codegenoptions::LimitedDebugInfo) { if (Args.hasFlag(options::OPT_fno_eliminate_unused_debug_types, options::OPT_feliminate_unused_debug_types, false)) DebugInfoKind = codegenoptions::UnusedTypeInfo; else if (NeedFullDebug) DebugInfoKind = codegenoptions::FullDebugInfo; } ``` ================ Comment at: clang/test/CodeGen/debug-info-unused-types.cpp:24-30 +// NODBG-NOT: !DICompositeType(tag: DW_TAG_enumeration_type, name: "baz" +// NODBG-NOT: !DIEnumerator(name: "BAZ" +// NODBG-NOT: !DICompositeType(tag: DW_TAG_enumeration_type, name: "z" +// NODBG-NOT: !DIEnumerator(name: "Z" +// NODBG-NOT: !DIDerivedType(tag: DW_TAG_typedef, name: "foo" +// NODBG-NOT: !DICompositeType(tag: DW_TAG_class_type, name: "bar" +// NODBG-NOT: !DICompositeType(tag: DW_TAG_class_type, name: "y" ---------------- nickdesaulniers wrote: > dblaikie wrote: > > Maybe simpler to test the NODBG by `NODBG-NOT: DI{{[a-zA-Z]*}}Type` ? Not > > sure if that'd quite work, but might be adequate. > `DISubroutineType` unfortunately would match. > `!DI{{CompositeType|Enumerator|DerivedType}} ` does work though! Sweet - thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80242/new/ https://reviews.llvm.org/D80242 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits