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