Delete trivial getter.
llvm-svn: 296123
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 5f9b71e..700be0f 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -515,7 +515,7 @@
static OutputSectionBase *
findSection(StringRef Name, const std::vector<OutputSectionBase *> &Sections) {
auto End = Sections.end();
- auto HasName = [=](OutputSectionBase *Sec) { return Sec->getName() == Name; };
+ auto HasName = [=](OutputSectionBase *Sec) { return Sec->Name == Name; };
auto I = std::find_if(Sections.begin(), End, HasName);
std::vector<OutputSectionBase *> Ret;
if (I == End)
@@ -752,7 +752,7 @@
}
for (OutputSectionBase *Sec : *OutputSections) {
- StringRef Name = Sec->getName();
+ StringRef Name = Sec->Name;
// Find the last spot where we can insert a command and still get the
// correct result.
@@ -851,7 +851,7 @@
break;
// Assign headers specified by linker script
- for (size_t Id : getPhdrIndices(Sec->getName())) {
+ for (size_t Id : getPhdrIndices(Sec->Name)) {
Ret[Id].add(Sec);
if (Opt.PhdrsCommands[Id].Flags == UINT_MAX)
Ret[Id].p_flags |= Sec->getPhdrFlags();
@@ -941,7 +941,7 @@
static OutputSectionBase FakeSec("", 0, 0);
for (OutputSectionBase *Sec : *OutputSections)
- if (Sec->getName() == Name)
+ if (Sec->Name == Name)
return Sec;
error(Loc + ": undefined section " + Name);
@@ -957,7 +957,7 @@
template <class ELFT>
uint64_t LinkerScript<ELFT>::getOutputSectionSize(StringRef Name) {
for (OutputSectionBase *Sec : *OutputSections)
- if (Sec->getName() == Name)
+ if (Sec->Name == Name)
return Sec->Size;
return 0;
}