Add llvm_unreachable to unreachable code.
The original code was an infinite recursion when the control reaches there. llvm-svn: 256981
This commit is contained in:
parent
a61e5a8d4e
commit
58a636ac06
|
@ -52,7 +52,9 @@ InputSectionBase<ELFT>::getOffset(uintX_t Offset) {
|
|||
case Merge:
|
||||
return cast<MergeInputSection<ELFT>>(this)->getOffset(Offset);
|
||||
case MipsReginfo:
|
||||
return cast<MipsReginfoInputSection<ELFT>>(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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue