diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 2548200feb65..f758145e0214 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -52,7 +52,9 @@ InputSectionBase::getOffset(uintX_t Offset) { case Merge: return cast>(this)->getOffset(Offset); case MipsReginfo: - return cast>(this)->getOffset(Offset); + // MIPS .reginfo sections are consumed by the linker, + // so it should never be copied to output. + llvm_unreachable("MIPS .reginfo reached writeTo()."); } llvm_unreachable("Invalid section kind"); }