[ELF] Replace an unneeded dyn_cast_or_null with dyn_cast. NFC

This commit is contained in:
Fangrui Song 2022-02-28 00:50:06 -08:00
parent fee78961f5
commit 8d01ac75e7
1 changed files with 1 additions and 1 deletions

View File

@ -1429,7 +1429,7 @@ template <class ELFT> void Writer<ELFT>::sortSections() {
sortInputSections();
for (SectionCommand *cmd : script->sectionCommands)
if (auto *osec = dyn_cast_or_null<OutputSection>(cmd))
if (auto *osec = dyn_cast<OutputSection>(cmd))
osec->sortRank = getSectionRank(osec);
if (!script->hasSectionsCommand) {
// We know that all the OutputSections are contiguous in this case.