diff options
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 5f9b71e22da..700be0f5f84 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -515,7 +515,7 @@ template <class ELFT> 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 @@ template <class ELFT> void LinkerScript<ELFT>::placeOrphanSections() { } 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 @@ template <class ELFT> std::vector<PhdrEntry> LinkerScript<ELFT>::createPhdrs() { 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 @@ const OutputSectionBase *LinkerScript<ELFT>::getOutputSection(const Twine &Loc, 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 @@ const OutputSectionBase *LinkerScript<ELFT>::getOutputSection(const Twine &Loc, 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; } |

