This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Reorganize + extend ICF test
ClosedPublic

Authored by int3 on Jul 16 2021, 11:40 PM.

Details

Reviewers
gkm
Group Reviewers
Restricted Project
Commits
rG8eac5dcb36dd: [lld-macho] Reorganize + extend ICF test
Summary

I found icf.s a bit hard to work with as it was not possible to
extend any of the functions _a ... _k to test new relocation /
referent types without modifying every single one of them. Additionally,
their one-letter names were not descriptive (though the comments
helped).

I've renamed all the functions to reflect the feature they are testing,
and shrunk them so that they contain just enough to test that one
feature.

I've also added tests for non-zero addends (via the
_abs1a_ref_with_addend and _defined_ref_with_addend_1 functions).

Diff Detail

Event Timeline

int3 created this revision.Jul 16 2021, 11:40 PM
Herald added a project: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Jul 16 2021, 11:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2021, 11:40 PM
gkm accepted this revision.Jul 22 2021, 1:42 PM

Nice! Yes, the terse non-descriptive names were getting out of hand.

lld/test/MachO/icf.s
69–73

These could benefit from descriptive names too.

This revision is now accepted and ready to land.Jul 22 2021, 1:42 PM
This revision was landed with ongoing or failed builds.Jul 23 2021, 8:49 AM
This revision was automatically updated to reflect the committed changes.
int3 marked an inline comment as done.