diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp index c2765453aa964..7cf723a8cf103 100644 --- a/lld/COFF/Writer.cpp +++ b/lld/COFF/Writer.cpp @@ -472,7 +472,7 @@ bool Writer::createThunks(OutputSection *os, int margin) { // Recheck Chunks.size() each iteration, since we can insert more // elements into it. for (size_t i = 0; i != os->chunks.size(); ++i) { - SectionChunk *sc = dyn_cast_or_null(os->chunks[i]); + SectionChunk *sc = dyn_cast(os->chunks[i]); if (!sc) continue; MachineTypes machine = sc->getMachine(); @@ -606,7 +606,7 @@ void Writer::createECCodeMap() { // Verify that all relocations are in range, with no extra margin requirements. bool Writer::verifyRanges(const std::vector chunks) { for (Chunk *c : chunks) { - SectionChunk *sc = dyn_cast_or_null(c); + SectionChunk *sc = dyn_cast(c); if (!sc) continue; MachineTypes machine = sc->getMachine(); @@ -872,8 +872,8 @@ bool Writer::fixGnuImportChunks() { if (!pSec->chunks.empty()) hasIdata = true; llvm::stable_sort(pSec->chunks, [&](Chunk *s, Chunk *t) { - SectionChunk *sc1 = dyn_cast_or_null(s); - SectionChunk *sc2 = dyn_cast_or_null(t); + SectionChunk *sc1 = dyn_cast(s); + SectionChunk *sc2 = dyn_cast(t); if (!sc1 || !sc2) { // if SC1, order them ascending. If SC2 or both null, // S is not less than T.