diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index f0a2d170f5f4..7df92d50c853 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -554,7 +554,7 @@ static void scanRelocs(InputSectionBase &C, ArrayRef Rels) { uintX_t Offset; if (PieceI != PieceE) { assert(PieceI->InputOff <= RI.r_offset && "Relocation not in any piece"); - if (PieceI->OutputOff == (uintX_t)-1) + if (PieceI->OutputOff == (size_t)-1) continue; Offset = PieceI->OutputOff + RI.r_offset - PieceI->InputOff; } else {