forked from OSchip/llvm-project
[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
This commit is contained in:
parent
3d5ea53906
commit
ae5d5426fb
|
@ -1186,7 +1186,7 @@ static void referenceStubBinder() {
|
|||
// dyld_stub_binder is in libSystem.dylib, which is usually linked in. This
|
||||
// isn't needed for correctness, but the presence of that symbol suppresses
|
||||
// "no symbols" diagnostics from `nm`.
|
||||
// StubHelperSection::setup() adds a reference and errors out if
|
||||
// StubHelperSection::setUp() adds a reference and errors out if
|
||||
// dyld_stub_binder doesn't exist in case it is actually needed.
|
||||
symtab->addUndefined("dyld_stub_binder", /*file=*/nullptr, /*isWeak=*/false);
|
||||
}
|
||||
|
|
|
@ -715,7 +715,7 @@ void StubHelperSection::writeTo(uint8_t *buf) const {
|
|||
}
|
||||
}
|
||||
|
||||
void StubHelperSection::setup() {
|
||||
void StubHelperSection::setUp() {
|
||||
Symbol *binder = symtab->addUndefined("dyld_stub_binder", /*file=*/nullptr,
|
||||
/*isWeakRef=*/false);
|
||||
if (auto *undefined = dyn_cast<Undefined>(binder))
|
||||
|
@ -769,7 +769,7 @@ void ObjCStubsSection::addEntry(Symbol *sym) {
|
|||
symbols.push_back(newSym);
|
||||
}
|
||||
|
||||
void ObjCStubsSection::setup() {
|
||||
void ObjCStubsSection::setUp() {
|
||||
Symbol *objcMsgSend = symtab->addUndefined("_objc_msgSend", /*file=*/nullptr,
|
||||
/*isWeakRef=*/false);
|
||||
objcMsgSend->used = true;
|
||||
|
|
|
@ -304,7 +304,7 @@ public:
|
|||
bool isNeeded() const override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
void setup();
|
||||
void setUp();
|
||||
|
||||
DylibSymbol *stubBinder = nullptr;
|
||||
Defined *dyldPrivate = nullptr;
|
||||
|
@ -324,7 +324,7 @@ public:
|
|||
bool isNeeded() const override { return !symbols.empty(); }
|
||||
void finalize() override { isec->isFinal = true; }
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
void setup();
|
||||
void setUp();
|
||||
|
||||
static constexpr llvm::StringLiteral symbolPrefix = "_objc_msgSend$";
|
||||
|
||||
|
|
|
@ -1139,7 +1139,7 @@ template <class LP> void Writer::run() {
|
|||
// InputSections, we should have `isec->canonical() == isec`.
|
||||
scanSymbols();
|
||||
if (in.objcStubs->isNeeded())
|
||||
in.objcStubs->setup();
|
||||
in.objcStubs->setUp();
|
||||
scanRelocations();
|
||||
|
||||
// Do not proceed if there was an undefined symbol.
|
||||
|
@ -1148,7 +1148,7 @@ template <class LP> void Writer::run() {
|
|||
return;
|
||||
|
||||
if (in.stubHelper->isNeeded())
|
||||
in.stubHelper->setup();
|
||||
in.stubHelper->setUp();
|
||||
|
||||
if (in.objCImageInfo->isNeeded())
|
||||
in.objCImageInfo->finalizeContents();
|
||||
|
|
Loading…
Reference in New Issue