Skip to content

Commit e692db0

Browse files
author
Alex B
committed
[lld-macho] Address Feedback #2
1 parent 7954143 commit e692db0

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

lld/MachO/SyntheticSections.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,9 @@ void ObjCSelRefsSection::initialize() {
836836
}
837837
}
838838

839-
ConcatInputSection *ObjCSelRefsSection::makeSelRef(StringRef methName) {
839+
ConcatInputSection *ObjCSelRefsSection::makeSelRef(StringRef methname) {
840840
auto methnameOffset =
841-
in.objcMethnameSection->getStringOffset(methName).outSecOff;
841+
in.objcMethnameSection->getStringOffset(methname).outSecOff;
842842

843843
size_t wordSize = target->wordSize;
844844
uint8_t *selrefData = bAlloc().Allocate<uint8_t>(wordSize);
@@ -857,12 +857,12 @@ ConcatInputSection *ObjCSelRefsSection::makeSelRef(StringRef methName) {
857857
objcSelref->parent = ConcatOutputSection::getOrCreateForInput(objcSelref);
858858
inputSections.push_back(objcSelref);
859859
objcSelref->isFinal = true;
860-
methnameToSelref[CachedHashStringRef(methName)] = objcSelref;
860+
methnameToSelref[CachedHashStringRef(methname)] = objcSelref;
861861
return objcSelref;
862862
}
863863

864-
ConcatInputSection *ObjCSelRefsSection::getSelRef(StringRef methName) {
865-
auto it = methnameToSelref.find(CachedHashStringRef(methName));
864+
ConcatInputSection *ObjCSelRefsSection::getSelRef(StringRef methname) {
865+
auto it = methnameToSelref.find(CachedHashStringRef(methname));
866866
if (it == methnameToSelref.end())
867867
return nullptr;
868868
return it->second;

lld/MachO/SyntheticSections.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,16 @@ class ObjCSelRefsSection final : public SyntheticSection {
320320
ObjCSelRefsSection();
321321
void initialize();
322322

323-
// This SyntheticSection does not do its own writing, but instead uses the
324-
// creates SyntheticInputSection's and inserts them into inputSections
323+
// This SyntheticSection does not do directly write data to the output, it is
324+
// just a placeholder for easily creating SyntheticInputSection's which will
325+
// be inserted into inputSections and handeled by the default writing
326+
// mechanism.
325327
uint64_t getSize() const override { return 0; }
326328
bool isNeeded() const override { return false; }
327329
void writeTo(uint8_t *buf) const override {}
328330

329-
ConcatInputSection *getSelRef(StringRef methName);
330-
ConcatInputSection *makeSelRef(StringRef methName);
331+
ConcatInputSection *getSelRef(StringRef methname);
332+
ConcatInputSection *makeSelRef(StringRef methname);
331333

332334
private:
333335
llvm::DenseMap<llvm::CachedHashStringRef, ConcatInputSection *>

0 commit comments

Comments
 (0)