diff options
| -rw-r--r-- | lld/ELF/Writer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index da42fb72a4d..df883ef98ba 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -908,9 +908,8 @@ static void sortBySymbolsOrder(ArrayRef<OutputSection *> OutputSections) { } // Sort sections by priority. - for (OutputSection *Base : OutputSections) - if (auto *Sec = dyn_cast<OutputSection>(Base)) - Sec->sort([&](InputSectionBase *S) { return SectionOrder.lookup(S); }); + for (OutputSection *Sec : OutputSections) + Sec->sort([&](InputSectionBase *S) { return SectionOrder.lookup(S); }); } template <class ELFT> |

