This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Add -fuse-ctor-homing cc1 flag so we can turn on constructor homing only if limited debug info is already on.
ClosedPublic

Authored by akhuang on Aug 11 2020, 5:39 PM.

Details

Summary

This adds a cc1 flag to enable constructor homing but doesn't turn on debug
info if it wasn't enabled already (which is what using
-debug-info-kind=constructor does). This will be used for testing, and won't
be needed anymore once ctor homing is used as default / merged into =limited.

Bug to enable ctor homing: https://bugs.llvm.org/show_bug.cgi?id=46537

Diff Detail

Event Timeline

akhuang created this revision.Aug 11 2020, 5:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2020, 5:39 PM
akhuang requested review of this revision.Aug 11 2020, 5:39 PM

Looks good! Could you add a test case for this too?

akhuang updated this revision to Diff 285203.Aug 12 2020, 4:03 PM

Add test case.

Yep, just added a line to the existing ctor homing test case.

If possible, could you test the negative cases too? That -fuse-ctor-homing doesn't override -debug-info-kind=line-tables-only or no -debug-info-kind at all?

If possible, could you test the negative cases too? That -fuse-ctor-homing doesn't override -debug-info-kind=line-tables-only or no -debug-info-kind at all?

Oh, good point.

akhuang updated this revision to Diff 285214.Aug 12 2020, 5:06 PM

Add more extensive check that -fuse-ctor-homing only does something when -debug-info-kind=limited

dblaikie accepted this revision.Aug 12 2020, 9:54 PM

Looks great, thanks!

This revision is now accepted and ready to land.Aug 12 2020, 9:54 PM
This revision was landed with ongoing or failed builds.Aug 13 2020, 3:49 PM
This revision was automatically updated to reflect the committed changes.