diff options
-rw-r--r-- | lld/ELF/LinkerScript.cpp | 6 | ||||
-rw-r--r-- | lld/ELF/LinkerScript.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index ae21039f34c..966acf3eb6f 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -185,7 +185,7 @@ bool LinkerScript<ELFT>::shouldKeep(InputSectionBase<ELFT> *S) { template <class ELFT> static OutputSectionBase<ELFT> * -findSection(std::vector<OutputSectionBase<ELFT> *> &V, StringRef Name) { +findSection(ArrayRef<OutputSectionBase<ELFT> *> V, StringRef Name) { for (OutputSectionBase<ELFT> *Sec : V) if (Sec->getName() == Name) return Sec; @@ -194,7 +194,7 @@ findSection(std::vector<OutputSectionBase<ELFT> *> &V, StringRef Name) { template <class ELFT> void LinkerScript<ELFT>::assignAddresses( - std::vector<OutputSectionBase<ELFT> *> &Sections) { + ArrayRef<OutputSectionBase<ELFT> *> Sections) { typedef typename ELFT::uint uintX_t; // Orphan sections are sections present in the input files which @@ -219,7 +219,7 @@ void LinkerScript<ELFT>::assignAddresses( continue; } - OutputSectionBase<ELFT> *Sec = findSection(Sections, Cmd.SectionName); + OutputSectionBase<ELFT> *Sec = findSection<ELFT>(Sections, Cmd.SectionName); if (!Sec) continue; diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h index 8ae41a66f59..0d3078e0400 100644 --- a/lld/ELF/LinkerScript.h +++ b/lld/ELF/LinkerScript.h @@ -81,7 +81,7 @@ public: ArrayRef<uint8_t> getFiller(StringRef Name); bool isDiscarded(InputSectionBase<ELFT> *S); bool shouldKeep(InputSectionBase<ELFT> *S); - void assignAddresses(std::vector<OutputSectionBase<ELFT> *> &S); + void assignAddresses(ArrayRef<OutputSectionBase<ELFT> *> S); int compareSections(StringRef A, StringRef B); uint32_t getSectionOrder(StringRef Name); |