summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/OutputSections.cpp5
-rw-r--r--lld/ELF/OutputSections.h2
-rw-r--r--lld/ELF/Writer.cpp4
3 files changed, 5 insertions, 6 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 9eff851c7e3..15d467a7922 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -163,8 +163,7 @@ template <class ELFT> void OutputSection<ELFT>::assignOffsets() {
}
template <class ELFT>
-void OutputSection<ELFT>::sort(
- std::function<int(InputSection<ELFT> *S)> Order) {
+void OutputSection<ELFT>::sort(std::function<int(InputSectionData *S)> Order) {
typedef std::pair<unsigned, InputSection<ELFT> *> Pair;
auto Comp = [](const Pair &A, const Pair &B) { return A.first < B.first; };
@@ -185,7 +184,7 @@ void OutputSection<ELFT>::sort(
// For more detail, read the section of the GCC's manual about init_priority.
template <class ELFT> void OutputSection<ELFT>::sortInitFini() {
// Sort sections by priority.
- sort([](InputSection<ELFT> *S) { return getPriority(S->Name); });
+ sort([](InputSectionData *S) { return getPriority(S->Name); });
}
// Returns true if S matches /Filename.?\.o$/.
diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h
index f5b8157696b..a2ab3b049a2 100644
--- a/lld/ELF/OutputSections.h
+++ b/lld/ELF/OutputSections.h
@@ -112,7 +112,7 @@ public:
typedef typename ELFT::uint uintX_t;
OutputSection(StringRef Name, uint32_t Type, uintX_t Flags);
void addSection(InputSectionData *C) override;
- void sort(std::function<int(InputSection<ELFT> *S)> Order);
+ void sort(std::function<int(InputSectionData *S)> Order);
void sortInitFini();
void sortCtorsDtors();
void writeTo(uint8_t *Buf) override;
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index a2064e3cfd8..abdf61a8e7a 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -885,7 +885,7 @@ static void sortBySymbolsOrder(ArrayRef<OutputSectionBase *> OutputSections) {
SymbolOrder.insert({S, Priority++});
// Build a map from sections to their priorities.
- DenseMap<InputSectionBase<ELFT> *, int> SectionOrder;
+ DenseMap<InputSectionData *, int> SectionOrder;
for (elf::ObjectFile<ELFT> *File : Symtab<ELFT>::X->getObjectFiles()) {
for (SymbolBody *Body : File->getSymbols()) {
auto *D = dyn_cast<DefinedRegular<ELFT>>(Body);
@@ -899,7 +899,7 @@ static void sortBySymbolsOrder(ArrayRef<OutputSectionBase *> OutputSections) {
// Sort sections by priority.
for (OutputSectionBase *Base : OutputSections)
if (auto *Sec = dyn_cast<OutputSection<ELFT>>(Base))
- Sec->sort([&](InputSection<ELFT> *S) { return SectionOrder.lookup(S); });
+ Sec->sort([&](InputSectionData *S) { return SectionOrder.lookup(S); });
}
template <class ELFT>
OpenPOWER on IntegriCloud