Skip to content

Commit ae5d542

Browse files
committed
[lld-macho] Rename {StubHelper,ObjCStubs}Section::setup() to setUp (NFC)
The phrasal verb is spelled "set up"; "setup" is a noun. Suggested in https://reviews.llvm.org/D132947#inline-1280089
1 parent 3d5ea53 commit ae5d542

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lld/MachO/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ static void referenceStubBinder() {
11861186
// dyld_stub_binder is in libSystem.dylib, which is usually linked in. This
11871187
// isn't needed for correctness, but the presence of that symbol suppresses
11881188
// "no symbols" diagnostics from `nm`.
1189-
// StubHelperSection::setup() adds a reference and errors out if
1189+
// StubHelperSection::setUp() adds a reference and errors out if
11901190
// dyld_stub_binder doesn't exist in case it is actually needed.
11911191
symtab->addUndefined("dyld_stub_binder", /*file=*/nullptr, /*isWeak=*/false);
11921192
}

lld/MachO/SyntheticSections.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ void StubHelperSection::writeTo(uint8_t *buf) const {
715715
}
716716
}
717717

718-
void StubHelperSection::setup() {
718+
void StubHelperSection::setUp() {
719719
Symbol *binder = symtab->addUndefined("dyld_stub_binder", /*file=*/nullptr,
720720
/*isWeakRef=*/false);
721721
if (auto *undefined = dyn_cast<Undefined>(binder))
@@ -769,7 +769,7 @@ void ObjCStubsSection::addEntry(Symbol *sym) {
769769
symbols.push_back(newSym);
770770
}
771771

772-
void ObjCStubsSection::setup() {
772+
void ObjCStubsSection::setUp() {
773773
Symbol *objcMsgSend = symtab->addUndefined("_objc_msgSend", /*file=*/nullptr,
774774
/*isWeakRef=*/false);
775775
objcMsgSend->used = true;

lld/MachO/SyntheticSections.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ class StubHelperSection final : public SyntheticSection {
304304
bool isNeeded() const override;
305305
void writeTo(uint8_t *buf) const override;
306306

307-
void setup();
307+
void setUp();
308308

309309
DylibSymbol *stubBinder = nullptr;
310310
Defined *dyldPrivate = nullptr;
@@ -324,7 +324,7 @@ class ObjCStubsSection final : public SyntheticSection {
324324
bool isNeeded() const override { return !symbols.empty(); }
325325
void finalize() override { isec->isFinal = true; }
326326
void writeTo(uint8_t *buf) const override;
327-
void setup();
327+
void setUp();
328328

329329
static constexpr llvm::StringLiteral symbolPrefix = "_objc_msgSend$";
330330

lld/MachO/Writer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ template <class LP> void Writer::run() {
11391139
// InputSections, we should have `isec->canonical() == isec`.
11401140
scanSymbols();
11411141
if (in.objcStubs->isNeeded())
1142-
in.objcStubs->setup();
1142+
in.objcStubs->setUp();
11431143
scanRelocations();
11441144

11451145
// Do not proceed if there was an undefined symbol.
@@ -1148,7 +1148,7 @@ template <class LP> void Writer::run() {
11481148
return;
11491149

11501150
if (in.stubHelper->isNeeded())
1151-
in.stubHelper->setup();
1151+
in.stubHelper->setUp();
11521152

11531153
if (in.objCImageInfo->isNeeded())
11541154
in.objCImageInfo->finalizeContents();

0 commit comments

Comments
 (0)