This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Move constructor homing case in shouldOmitDefinition.
ClosedPublic

Authored by akhuang on Aug 24 2020, 3:19 PM.

Details

Summary

For some reason the ctor homing case was before the template
specialization case, and could have returned false too early.
I moved the code out into a separate function to avoid this.

Also added a run line to the template specialization test. I guess
all the -debug-info-kind=limited tests should still pass with =constructor,
but it's probably unnecessary to test for all of those.

Diff Detail

Event Timeline

akhuang created this revision.Aug 24 2020, 3:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2020, 3:19 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
akhuang requested review of this revision.Aug 24 2020, 3:19 PM
dblaikie accepted this revision.Aug 24 2020, 5:04 PM

Thanks for testing/catching this (what sort of testing have you been doing that discovered this?)!

& yeah, the way shouldOmitDefinition is now written (with this fix) is right - that every check only gives an opportunity to return true, then falls through to the next case - never an early return false.

This revision is now accepted and ready to land.Aug 24 2020, 5:04 PM

unfortunately not any thorough testing :) I just happened to notice it the last time I looked at this code

This revision was landed with ongoing or failed builds.Aug 24 2020, 8:18 PM
This revision was automatically updated to reflect the committed changes.

Note that Harbormaster actually reported the check-clang-codegencxx issues B69369..

ormris added a subscriber: ormris.Aug 24 2020, 10:37 PM

Note that Harbormaster actually reported the check-clang-codegencxx issues B69369..

Definitely my bad; I thought I had run check-clang locally before committing, but maybe .. I didn't?

akhuang reopened this revision.Aug 25 2020, 12:20 PM

just reopening to update the diff.

This revision is now accepted and ready to land.Aug 25 2020, 12:20 PM
akhuang updated this revision to Diff 287748.Aug 25 2020, 12:30 PM

Fix errors.

dblaikie accepted this revision.Aug 25 2020, 2:55 PM

Looks good, thanks!

akhuang closed this revision.Sep 1 2020, 8:25 AM

ah sorry, this was relanded in b1009ee84fc0242bcebd07889306bf39d9b7170f.