Revert 277594, it caused PR28827
llvm-svn: 277599
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index d0dee08..656e646 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -218,8 +218,9 @@
}
}
-template <class ELFT> void LinkerScript<ELFT>::assignAddresses() {
- ArrayRef<OutputSectionBase<ELFT> *> Sections = *OutputSections;
+template <class ELFT>
+void LinkerScript<ELFT>::assignAddresses(
+ ArrayRef<OutputSectionBase<ELFT> *> Sections) {
// Orphan sections are sections present in the input files which
// are not explicitly placed into the output file by the linker script.
// We place orphan sections at end of file.
@@ -288,8 +289,8 @@
}
template <class ELFT>
-std::vector<PhdrEntry<ELFT>> LinkerScript<ELFT>::createPhdrs() {
- ArrayRef<OutputSectionBase<ELFT> *> Sections = *OutputSections;
+std::vector<PhdrEntry<ELFT>>
+LinkerScript<ELFT>::createPhdrs(ArrayRef<OutputSectionBase<ELFT> *> Sections) {
std::vector<PhdrEntry<ELFT>> Ret;
for (const PhdrsCommand &Cmd : Opt.PhdrsCommands) {