================
@@ -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)
----------------
dwblaikie wrote:

Added that at the driver level - and similarly for type units (since they use 
an mllvm flag, clang frontend/codegen doesn't actually know if type units are 
enabled). (though this doesn't work out /that/ badly for type units, in some 
sense - the type units are still consistent, they just consistently contain no 
member functions (in the same way that even without the flag, for things like 
member function template instantiations we never put them in the member list, 
so they never end up in type units - only attached as declarations to the 
skeleton type DIE in the CU))

https://github.com/llvm/llvm-project/pull/87018
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to