[lld-macho][nfc] Have InputSection ctors take some parameters
authorJez Ng <jezng@fb.com>
Fri, 11 Jun 2021 23:49:53 +0000 (19:49 -0400)
committerJez Ng <jezng@fb.com>
Fri, 11 Jun 2021 23:50:09 +0000 (19:50 -0400)
commit681cfeb59119f2ddc5418e4e3a48c632dcd1aa3e
treef7116f35d637613c7dd8bf78fe9f0eb2dac0791f
parent7f2ba39b1688230c663986485f605cf8df90f895
[lld-macho][nfc] Have InputSection ctors take some parameters

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.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D103978
lld/MachO/ConcatOutputSection.cpp
lld/MachO/Driver.cpp
lld/MachO/InputFiles.cpp
lld/MachO/InputSection.cpp
lld/MachO/InputSection.h
lld/MachO/SyntheticSections.cpp