[lldb] Silence warning with Clang ToT

This fixes `-Wcovered-switch-default` warnings. This is a reminiscent of an old refactoring, see ce03a86237.
This commit is contained in:
Alexandre Ganea 2024-01-09 08:34:58 -05:00
parent 994e478601
commit 8ef7aaa637

View File

@ -98,27 +98,16 @@ RegisterContextPOSIX_mips64::GetRegisterInfoAtIndex(size_t reg) {
}
size_t RegisterContextPOSIX_mips64::GetRegisterSetCount() {
ArchSpec target_arch = m_register_info_up->GetTargetArchitecture();
switch (target_arch.GetTriple().getOS()) {
default: {
const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>(
m_register_info_up.get());
return context->GetRegisterSetCount();
}
}
}
const RegisterSet *RegisterContextPOSIX_mips64::GetRegisterSet(size_t set) {
ArchSpec target_arch = m_register_info_up->GetTargetArchitecture();
switch (target_arch.GetTriple().getOS()) {
default: {
const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>(
m_register_info_up.get());
return context->GetRegisterSet(set);
}
}
}
const char *RegisterContextPOSIX_mips64::GetRegisterName(unsigned reg) {
assert(reg < m_num_registers && "Invalid register offset.");