@@ -472,7 +472,7 @@ bool Writer::createThunks(OutputSection *os, int margin) {
472
472
// Recheck Chunks.size() each iteration, since we can insert more
473
473
// elements into it.
474
474
for (size_t i = 0 ; i != os->chunks .size (); ++i) {
475
- SectionChunk *sc = dyn_cast_or_null <SectionChunk>(os->chunks [i]);
475
+ SectionChunk *sc = dyn_cast <SectionChunk>(os->chunks [i]);
476
476
if (!sc)
477
477
continue ;
478
478
MachineTypes machine = sc->getMachine ();
@@ -606,7 +606,7 @@ void Writer::createECCodeMap() {
606
606
// Verify that all relocations are in range, with no extra margin requirements.
607
607
bool Writer::verifyRanges (const std::vector<Chunk *> chunks) {
608
608
for (Chunk *c : chunks) {
609
- SectionChunk *sc = dyn_cast_or_null <SectionChunk>(c);
609
+ SectionChunk *sc = dyn_cast <SectionChunk>(c);
610
610
if (!sc)
611
611
continue ;
612
612
MachineTypes machine = sc->getMachine ();
@@ -872,8 +872,8 @@ bool Writer::fixGnuImportChunks() {
872
872
if (!pSec->chunks .empty ())
873
873
hasIdata = true ;
874
874
llvm::stable_sort (pSec->chunks , [&](Chunk *s, Chunk *t) {
875
- SectionChunk *sc1 = dyn_cast_or_null <SectionChunk>(s);
876
- SectionChunk *sc2 = dyn_cast_or_null <SectionChunk>(t);
875
+ SectionChunk *sc1 = dyn_cast <SectionChunk>(s);
876
+ SectionChunk *sc2 = dyn_cast <SectionChunk>(t);
877
877
if (!sc1 || !sc2) {
878
878
// if SC1, order them ascending. If SC2 or both null,
879
879
// S is not less than T.
0 commit comments