[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:33 PDT 2024
================
@@ -2755,7 +2755,7 @@ CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) {
// Collect data fields (including static variables and any initializers).
CollectRecordFields(RD, DefUnit, EltTys, FwdDecl);
- if (CXXDecl)
+ if (CXXDecl && !CGM.getCodeGenOpts().DebugOmitUnreferencedMembers)
----------------
SLTozer wrote:
>From the old review, there was a question about whether this should be disabled by `-fstandalone-debug` - it seemed like there was a reasonable case for (being able to call member functions from a different TU without debug info), and a reasonable case against (inconsistency with non-member functions), and it's not totally clear whether that was resolved.
https://github.com/llvm/llvm-project/pull/87018
More information about the cfe-commits
mailing list