mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Convert assert(0) to llvm_unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -528,6 +528,7 @@ unsigned MachineJumpTableInfo::getEntrySize(const TargetData &TD) const {
|
||||
// The size of a jump table entry is 4 bytes unless the entry is just the
|
||||
// address of a block, in which case it is the pointer size.
|
||||
switch (getEntryKind()) {
|
||||
default: llvm_unreachable("Unknown jump table encoding!");
|
||||
case MachineJumpTableInfo::EK_BlockAddress:
|
||||
return TD.getPointerSize();
|
||||
case MachineJumpTableInfo::EK_GPRel64BlockAddress:
|
||||
@ -539,8 +540,6 @@ unsigned MachineJumpTableInfo::getEntrySize(const TargetData &TD) const {
|
||||
case MachineJumpTableInfo::EK_Inline:
|
||||
return 0;
|
||||
}
|
||||
assert(0 && "Unknown jump table encoding!");
|
||||
return ~0;
|
||||
}
|
||||
|
||||
/// getEntryAlignment - Return the alignment of each entry in the jump table.
|
||||
@ -549,6 +548,7 @@ unsigned MachineJumpTableInfo::getEntryAlignment(const TargetData &TD) const {
|
||||
// entry is just the address of a block, in which case it is the pointer
|
||||
// alignment.
|
||||
switch (getEntryKind()) {
|
||||
default: llvm_unreachable("Unknown jump table encoding!");
|
||||
case MachineJumpTableInfo::EK_BlockAddress:
|
||||
return TD.getPointerABIAlignment();
|
||||
case MachineJumpTableInfo::EK_GPRel64BlockAddress:
|
||||
@ -560,8 +560,6 @@ unsigned MachineJumpTableInfo::getEntryAlignment(const TargetData &TD) const {
|
||||
case MachineJumpTableInfo::EK_Inline:
|
||||
return 1;
|
||||
}
|
||||
assert(0 && "Unknown jump table encoding!");
|
||||
return ~0;
|
||||
}
|
||||
|
||||
/// createJumpTableIndex - Create a new jump table entry in the jump table info.
|
||||
|
Reference in New Issue
Block a user