DWARFDebugInfo::ParseCompileUnitHeadersIfNeeded() was clearing each DWARFCompileUnit twice (ctor+Clear()).
Sure I can drop it if it is not worth the change.
Is such patch obvious enough to check it in without an approval?
Differential D40214
performance: Prevent needless DWARFCompileUnit::Clear() on freshly ctor-ed object jankratochvil on Nov 18 2017, 2:12 PM. Authored by
Details
Diff Detail Event TimelineComment Actions See inline comments.
Comment Actions Thanks for the review but then it would become a performance regression, not the performance improvement I was trying to make.
|
If you want to enforce this, then make this function static and have it return a shared pointer to a DWARFCompileUnit and make the constructor private. Commenting isn't enough on its own