mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
[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:
parent
994e478601
commit
8ef7aaa637
@ -98,27 +98,16 @@ RegisterContextPOSIX_mips64::GetRegisterInfoAtIndex(size_t reg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t RegisterContextPOSIX_mips64::GetRegisterSetCount() {
|
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 *>(
|
const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>(
|
||||||
m_register_info_up.get());
|
m_register_info_up.get());
|
||||||
return context->GetRegisterSetCount();
|
return context->GetRegisterSetCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const RegisterSet *RegisterContextPOSIX_mips64::GetRegisterSet(size_t set) {
|
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 *>(
|
const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>(
|
||||||
m_register_info_up.get());
|
m_register_info_up.get());
|
||||||
return context->GetRegisterSet(set);
|
return context->GetRegisterSet(set);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *RegisterContextPOSIX_mips64::GetRegisterName(unsigned reg) {
|
const char *RegisterContextPOSIX_mips64::GetRegisterName(unsigned reg) {
|
||||||
assert(reg < m_num_registers && "Invalid register offset.");
|
assert(reg < m_num_registers && "Invalid register offset.");
|
||||||
|
Loading…
Reference in New Issue
Block a user