aboutsummaryrefslogtreecommitdiff
path: root/lld/ELF/SyntheticSections.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-11-25 16:47:07 -0800
committerFangrui Song <i@maskray.me>2021-11-25 16:47:07 -0800
commit6188fd495744ffea76f481a960df9beacb8ce91b (patch)
treeeb1d2ed1495f287ec2ede453dd6ef6a36fe63801 /lld/ELF/SyntheticSections.cpp
parentf32c3d9528e4af6c27806b2f5fd50972b2aa27d5 (diff)
downloadllvm-6188fd495744ffea76f481a960df9beacb8ce91b.zip
llvm-6188fd495744ffea76f481a960df9beacb8ce91b.tar.gz
llvm-6188fd495744ffea76f481a960df9beacb8ce91b.tar.bz2
[ELF] Rename OutputSection::sectionCommands to commands. NFC
This partially reverts r315409: the description applies to LinkerScript, but not to OutputSection. The name "sectionCommands" is used in both LinkerScript::sectionCommands and OutputSection::sectionCommands, which may lead to confusion. "commands" in OutputSection has no ambiguity because there are no other types of commands.
Diffstat (limited to 'lld/ELF/SyntheticSections.cpp')
-rw-r--r--lld/ELF/SyntheticSections.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 3936f0f..0413e31 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -900,7 +900,7 @@ void MipsGotSection::build() {
got.pagesMap) {
const OutputSection *os = p.first;
uint64_t secSize = 0;
- for (BaseCommand *cmd : os->sectionCommands) {
+ for (BaseCommand *cmd : os->commands) {
if (auto *isd = dyn_cast<InputSectionDescription>(cmd))
for (InputSection *isec : isd->sections) {
uint64_t off = alignTo(secSize, isec->alignment);
@@ -3604,7 +3604,7 @@ PPC32Got2Section::PPC32Got2Section()
bool PPC32Got2Section::isNeeded() const {
// See the comment below. This is not needed if there is no other
// InputSection.
- for (BaseCommand *base : getParent()->sectionCommands)
+ for (BaseCommand *base : getParent()->commands)
if (auto *isd = dyn_cast<InputSectionDescription>(base))
for (InputSection *isec : isd->sections)
if (isec != this)
@@ -3618,7 +3618,7 @@ void PPC32Got2Section::finalizeContents() {
// PPC32PltCallStub::writeTo(). The purpose of this empty synthetic section is
// to collect input sections named ".got2".
uint32_t offset = 0;
- for (BaseCommand *base : getParent()->sectionCommands)
+ for (BaseCommand *base : getParent()->commands)
if (auto *isd = dyn_cast<InputSectionDescription>(base)) {
for (InputSection *isec : isd->sections) {
if (isec == this)