Simplify ArchSpec::IsMIPS()
llvm-svn: 360865
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
index efd8cad..d29a5e8 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -1020,11 +1020,7 @@
bool ProcessFreeBSD::SupportHardwareSingleStepping() const {
lldb_private::ArchSpec arch = GetTarget().GetArchitecture();
- if (arch.GetMachine() == llvm::Triple::arm ||
- arch.GetMachine() == llvm::Triple::mips64 ||
- arch.GetMachine() == llvm::Triple::mips64el ||
- arch.GetMachine() == llvm::Triple::mips ||
- arch.GetMachine() == llvm::Triple::mipsel)
+ if (arch.GetMachine() == llvm::Triple::arm || arch.IsMIPS())
return false;
return true;
}
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index d85ec21..1768b4b 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1007,11 +1007,7 @@
// Arm mode
error = SetSoftwareBreakpoint(next_pc, 4);
}
- } else if (m_arch.GetMachine() == llvm::Triple::mips64 ||
- m_arch.GetMachine() == llvm::Triple::mips64el ||
- m_arch.GetMachine() == llvm::Triple::mips ||
- m_arch.GetMachine() == llvm::Triple::mipsel ||
- m_arch.GetMachine() == llvm::Triple::ppc64le)
+ } else if (m_arch.IsMIPS() || m_arch.GetMachine() == llvm::Triple::ppc64le)
error = SetSoftwareBreakpoint(next_pc, 4);
else {
// No size hint is given for the next breakpoint
@@ -1031,11 +1027,7 @@
}
bool NativeProcessLinux::SupportHardwareSingleStepping() const {
- if (m_arch.GetMachine() == llvm::Triple::arm ||
- m_arch.GetMachine() == llvm::Triple::mips64 ||
- m_arch.GetMachine() == llvm::Triple::mips64el ||
- m_arch.GetMachine() == llvm::Triple::mips ||
- m_arch.GetMachine() == llvm::Triple::mipsel)
+ if (m_arch.GetMachine() == llvm::Triple::arm || m_arch.IsMIPS())
return false;
return true;
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 5e310aa..1916c50 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1720,19 +1720,13 @@
// On targets like MIPS and ppc64le, watchpoint exceptions are always
// generated before the instruction is executed. The connected target may
// not support qHostInfo or qWatchpointSupportInfo packets.
- after =
- !(atype == llvm::Triple::mips || atype == llvm::Triple::mipsel ||
- atype == llvm::Triple::mips64 || atype == llvm::Triple::mips64el ||
- atype == llvm::Triple::ppc64le);
+ after = !(arch.IsMIPS() || atype == llvm::Triple::ppc64le);
} else {
// For MIPS and ppc64le, set m_watchpoints_trigger_after_instruction to
// eLazyBoolNo if it is not calculated before.
- if ((m_watchpoints_trigger_after_instruction == eLazyBoolCalculate &&
- (atype == llvm::Triple::mips || atype == llvm::Triple::mipsel ||
- atype == llvm::Triple::mips64 || atype == llvm::Triple::mips64el)) ||
- atype == llvm::Triple::ppc64le) {
+ if (m_watchpoints_trigger_after_instruction == eLazyBoolCalculate &&
+ (arch.IsMIPS() || atype == llvm::Triple::ppc64le))
m_watchpoints_trigger_after_instruction = eLazyBoolNo;
- }
after = (m_watchpoints_trigger_after_instruction != eLazyBoolNo);
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index 7bc698e..d095c7a 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -233,11 +233,7 @@
if (host_arch.GetMachine() == llvm::Triple::aarch64 ||
host_arch.GetMachine() == llvm::Triple::aarch64_be ||
host_arch.GetMachine() == llvm::Triple::arm ||
- host_arch.GetMachine() == llvm::Triple::armeb ||
- host_arch.GetMachine() == llvm::Triple::mips64 ||
- host_arch.GetMachine() == llvm::Triple::mips64el ||
- host_arch.GetMachine() == llvm::Triple::mips ||
- host_arch.GetMachine() == llvm::Triple::mipsel)
+ host_arch.GetMachine() == llvm::Triple::armeb || host_arch.IsMIPS())
response.Printf("watchpoint_exceptions_received:before;");
else
response.Printf("watchpoint_exceptions_received:after;");