[lld] ae5d542 - [lld-macho] Rename {StubHelper,ObjCStubs}Section::setup() to setUp (NFC)

Daniel Bertalan via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 09:31:26 PDT 2022


Author: Daniel Bertalan
Date: 2022-08-30T18:30:14+02:00
New Revision: ae5d5426fb7e0e7aa6254d5c4d38bd79c6662e2f

URL: https://github.com/llvm/llvm-project/commit/ae5d5426fb7e0e7aa6254d5c4d38bd79c6662e2f
DIFF: https://github.com/llvm/llvm-project/commit/ae5d5426fb7e0e7aa6254d5c4d38bd79c6662e2f.diff

LOG: [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

Added: 
    

Modified: 
    lld/MachO/Driver.cpp
    lld/MachO/SyntheticSections.cpp
    lld/MachO/SyntheticSections.h
    lld/MachO/Writer.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index c2473c77c9db8..7d9b06411818b 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -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);
 }

diff  --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index f1fd76f6aa77a..1737484c83a93 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -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;

diff  --git a/lld/MachO/SyntheticSections.h b/lld/MachO/SyntheticSections.h
index 3c8b87c8c6dbb..9b158dbd515d1 100644
--- a/lld/MachO/SyntheticSections.h
+++ b/lld/MachO/SyntheticSections.h
@@ -304,7 +304,7 @@ class StubHelperSection final : public SyntheticSection {
   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 @@ class ObjCStubsSection final : public SyntheticSection {
   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$";
 

diff  --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp
index 59731aa657011..e8bcf8cd96445 100644
--- a/lld/MachO/Writer.cpp
+++ b/lld/MachO/Writer.cpp
@@ -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();


        


More information about the llvm-commits mailing list