[lldb] [Process/FreeBSDRemote] Fix clang-formatting on ppc commit
authorMichał Górny <mgorny@moritz.systems>
Sun, 14 Feb 2021 21:34:25 +0000 (22:34 +0100)
committerMichał Górny <mgorny@moritz.systems>
Sun, 14 Feb 2021 21:34:25 +0000 (22:34 +0100)
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_powerpc.cpp
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_powerpc.h
lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp

index f923507..98daa25 100644 (file)
@@ -88,7 +88,8 @@ NativeRegisterContextFreeBSD_powerpc::NativeRegisterContextFreeBSD_powerpc(
 
 RegisterContextFreeBSD_powerpc &
 NativeRegisterContextFreeBSD_powerpc::GetRegisterInfo() const {
-  return static_cast<RegisterContextFreeBSD_powerpc &>(*m_register_info_interface_up);
+  return static_cast<RegisterContextFreeBSD_powerpc &>(
+      *m_register_info_interface_up);
 }
 
 uint32_t NativeRegisterContextFreeBSD_powerpc::GetRegisterSetCount() const {
@@ -122,7 +123,6 @@ NativeRegisterContextFreeBSD_powerpc::GetSetForNativeRegNum(
   llvm_unreachable("Register does not belong to any register set");
 }
 
-
 uint32_t NativeRegisterContextFreeBSD_powerpc::GetUserRegisterCount() const {
   uint32_t count = 0;
   for (uint32_t set_index = 0; set_index < GetRegisterSetCount(); ++set_index)
@@ -136,8 +136,8 @@ Status NativeRegisterContextFreeBSD_powerpc::ReadRegisterSet(RegSetKind set) {
     return NativeProcessFreeBSD::PtraceWrapper(PT_GETREGS, m_thread.GetID(),
                                                m_reg_data.data());
   case FPRegSet:
-    return NativeProcessFreeBSD::PtraceWrapper(
-        PT_GETFPREGS, m_thread.GetID(), m_reg_data.data() + sizeof(reg));
+    return NativeProcessFreeBSD::PtraceWrapper(PT_GETFPREGS, m_thread.GetID(),
+                                               m_reg_data.data() + sizeof(reg));
   }
   llvm_unreachable("NativeRegisterContextFreeBSD_powerpc::ReadRegisterSet");
 }
@@ -148,15 +148,15 @@ Status NativeRegisterContextFreeBSD_powerpc::WriteRegisterSet(RegSetKind set) {
     return NativeProcessFreeBSD::PtraceWrapper(PT_SETREGS, m_thread.GetID(),
                                                m_reg_data.data());
   case FPRegSet:
-    return NativeProcessFreeBSD::PtraceWrapper(
-        PT_SETFPREGS, m_thread.GetID(), m_reg_data.data() + sizeof(reg));
+    return NativeProcessFreeBSD::PtraceWrapper(PT_SETFPREGS, m_thread.GetID(),
+                                               m_reg_data.data() + sizeof(reg));
   }
   llvm_unreachable("NativeRegisterContextFreeBSD_powerpc::WriteRegisterSet");
 }
 
 Status
 NativeRegisterContextFreeBSD_powerpc::ReadRegister(const RegisterInfo *reg_info,
-                                               RegisterValue &reg_value) {
+                                                   RegisterValue &reg_value) {
   Status error;
 
   if (!reg_info) {
index d76fdae..456ea30 100644 (file)
@@ -26,10 +26,11 @@ namespace process_freebsd {
 
 class NativeProcessFreeBSD;
 
-class NativeRegisterContextFreeBSD_powerpc : public NativeRegisterContextFreeBSD {
+class NativeRegisterContextFreeBSD_powerpc
+    : public NativeRegisterContextFreeBSD {
 public:
   NativeRegisterContextFreeBSD_powerpc(const ArchSpec &target_arch,
-                                   NativeThreadProtocol &native_thread);
+                                       NativeThreadProtocol &native_thread);
 
   uint32_t GetRegisterSetCount() const override;
 
index 548830d..f14dc8f 100644 (file)
@@ -463,12 +463,11 @@ TEST(RegisterContextFreeBSDTest, mips64) {
 
 #if defined(__powerpc__)
 
-#define EXPECT_GPR_PPC(lldb_reg, fbsd_reg)                                \
-  EXPECT_THAT(GetRegParams(reg_ctx, gpr_##lldb_reg##_powerpc),                  \
-              ::testing::Pair(offsetof(reg, fbsd_reg),               \
-                              sizeof(reg::fbsd_reg)))
-#define EXPECT_FPU_PPC(lldb_reg, fbsd_reg)                                   \
-  EXPECT_THAT(GetRegParams(reg_ctx, fpr_##lldb_reg##_powerpc),                   \
+#define EXPECT_GPR_PPC(lldb_reg, fbsd_reg)                                     \
+  EXPECT_THAT(GetRegParams(reg_ctx, gpr_##lldb_reg##_powerpc),                 \
+              ::testing::Pair(offsetof(reg, fbsd_reg), sizeof(reg::fbsd_reg)))
+#define EXPECT_FPU_PPC(lldb_reg, fbsd_reg)                                     \
+  EXPECT_THAT(GetRegParams(reg_ctx, fpr_##lldb_reg##_powerpc),                 \
               ::testing::Pair(offsetof(fpreg, fbsd_reg) + base_offset,         \
                               sizeof(fpreg::fbsd_reg)))