This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho][nfc] Have InputSection ctors take some parameters
ClosedPublic

Authored by int3 on Jun 9 2021, 10:25 AM.

Details

Summary

This is motivated by an upcoming diff in which the
WordLiteralInputSection ctor sets itself up based on the value of its
section flags. As such, it needs to be passed the flags value as part
of its ctor parameters, instead of having them assigned after the fact
in parseSection(). While refactoring code to make that possible, I
figured it would make sense for the other InputSections to also take
their initial values as ctor parameters.

Diff Detail

Event Timeline

int3 created this revision.Jun 9 2021, 10:25 AM
Herald added a project: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Jun 9 2021, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2021, 10:25 AM
thakis accepted this revision.Jun 10 2021, 5:35 AM
thakis added a subscriber: thakis.
thakis added inline comments.
lld/MachO/InputFiles.cpp
243–244

I think you're removing all callers of this below -- remove this function, it should be unused.

This revision is now accepted and ready to land.Jun 10 2021, 5:35 AM
This revision was landed with ongoing or failed builds.Jun 11 2021, 4:50 PM
This revision was automatically updated to reflect the committed changes.
int3 marked an inline comment as done.