[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)
Stephen Tozer via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 04:54:34 PDT 2024
================
@@ -4260,6 +4260,13 @@ defm strict_dwarf : BoolOption<"g", "strict-dwarf",
"the specified version, avoiding features from later versions.">,
NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption, DXCOption]>>,
Group<g_flags_Group>;
+defm omit_unreferenced_members : BoolOption<"g", "omit-unreferenced-members",
+ CodeGenOpts<"DebugOmitUnreferencedMembers">, DefaultFalse,
+ PosFlag<SetTrue, [], [ClangOption, CC1Option],
+ "Omit member function declarations from type descriptions if the "
+ "member is unreferenced.">,
+ NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption, DXCOption]>>,
+ Group<g_flags_Group>;
----------------
SLTozer wrote:
As a small matter of convenience, since this is just being passed straight through the driver I think this could be a marshalling flag, which iirc would allow us to omit the `renderDebugOptions` code?
```suggestion
defm omit_unreferenced_members : Flag<["-"], "gomit-unreferenced-members">,
Group<g_flags_Group>, Visibility<[ClangOption, CC1Option]>,
HelpText<"Omit member function declarations from type descriptions if the "
"member is unreferenced.">,
MarshallingInfoFlag<CodeGenOpts<"DebugOmitUnreferencedMembers">>;
```
https://github.com/llvm/llvm-project/pull/87018
More information about the cfe-commits
mailing list