github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp --
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
--diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git
a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index e6a29592e..7d8b2ea5e 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -613,8 +613,7 @@ Status NativeRegisterContextLinux_arm64::WriteRegister(
uint64_t vg_value = reg_value.GetAsUInt64();
if (sve::vl_valid(vg_value * 8)) {
- if (IsValid(RegisterSetType::SVE_HEADER) &&
- vg_value == GetSVERegVG())
+ if (IsValid(RegisterSetType::SVE_HEADER) && vg_value ==
GetSVERegVG())
return error;
SetSVERegVG(vg_value);
@@ -627,8 +626,7 @@ Status NativeRegisterContextLinux_arm64::WriteRegister(
ConfigureRegisterContext();
}
- if (IsValid(RegisterSetType::SVE_HEADER) &&
- vg_value == GetSVERegVG())
+ if (IsValid(RegisterSetType::SVE_HEADER) && vg_value ==
GetSVERegVG())
return error;
}
@@ -1140,9 +1138,8 @@ Status
NativeRegisterContextLinux_arm64::WriteAllRegisterValues(
if (error.Success()) {
// Wrote FPU, and SVE overlaps FPU.
- Invalidate(RegisterSetType::FPR,
- RegisterSetType::SVE_HEADER,
- RegisterSetType::SVE);
+ Invalidate(RegisterSetType::FPR, RegisterSetType::SVE_HEADER,
+ RegisterSetType::SVE);
m_sve_state = SVEState::Unknown;
ConfigureRegisterContext();
@@ -1336,7 +1333,7 @@ Status NativeRegisterContextLinux_arm64::WriteFPR() {
// SVE Z registers overlap the FP registers.
Invalidate(RegisterSetType::FPR, RegisterSetType::SVE_HEADER,
- RegisterSetType::SVE);
+ RegisterSetType::SVE);
return WriteRegisterSet(&ioVec, GetFPRSize(), llvm::ELF::NT_FPREGSET);
}
@@ -1406,7 +1403,7 @@ Status NativeRegisterContextLinux_arm64::WriteSVEHeader()
{
ioVec.iov_len = GetSVEHeaderSize();
Invalidate(RegisterSetType::FPR, RegisterSetType::SVE_HEADER,
- RegisterSetType::SVE);
+ RegisterSetType::SVE);
return WriteRegisterSet(&ioVec, GetSVEHeaderSize(), GetSVERegSet());
}
@@ -1441,7 +1438,7 @@ Status NativeRegisterContextLinux_arm64::WriteAllSVE() {
ioVec.iov_len = GetSVEBufferSize();
Invalidate(RegisterSetType::FPR, RegisterSetType::SVE_HEADER,
- RegisterSetType::SVE);
+ RegisterSetType::SVE);
return WriteRegisterSet(&ioVec, GetSVEBufferSize(), GetSVERegSet());
}
@@ -1618,10 +1615,9 @@ Status NativeRegisterContextLinux_arm64::WriteZA() {
ioVec.iov_base = GetZABuffer();
ioVec.iov_len = GetZABufferSize();
- Invalidate(
- RegisterSetType::ZA_HEADER, RegisterSetType::ZA,
- // Writing to ZA may enable ZA, which means ZT0 may change too.
- RegisterSetType::ZT);
+ Invalidate(RegisterSetType::ZA_HEADER, RegisterSetType::ZA,
+ // Writing to ZA may enable ZA, which means ZT0 may change too.
+ RegisterSetType::ZT);
return WriteRegisterSet(&ioVec, GetZABufferSize(), llvm::ELF::NT_ARM_ZA);
}
@@ -1655,9 +1651,9 @@ Status NativeRegisterContextLinux_arm64::WriteZT() {
ioVec.iov_len = GetZTBufferSize();
Invalidate(RegisterSetType::ZT,
- // Writing to an inactive ZT0 will enable ZA as well,
- // which invalidates our current copy of it.
- RegisterSetType::ZA_HEADER, RegisterSetType::ZA);
+ // Writing to an inactive ZT0 will enable ZA as well,
+ // which invalidates our current copy of it.
+ RegisterSetType::ZA_HEADER, RegisterSetType::ZA);
return WriteRegisterSet(&ioVec, GetZTBufferSize(), llvm::ELF::NT_ARM_ZT);
}
diff --git
a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
index edc9af568..e205546b4 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
@@ -104,11 +104,11 @@ private:
}
bool IsValid(RegisterSetType set) {
- return (m_validity.m_valid_flags &
static_cast<CacheValidity::Storage>(set)) != 0;
+ return (m_validity.m_valid_flags &
+ static_cast<CacheValidity::Storage>(set)) != 0;
}
- template <typename... Ts>
- void Invalidate(RegisterSetType first, Ts... rest) {
+ template <typename... Ts> void Invalidate(RegisterSetType first, Ts... rest)
{
static_assert((std::is_same_v<Ts, RegisterSetType> && ...));
m_validity.Invalidate(first);
(Invalidate(rest), ...);
@@ -119,12 +119,15 @@ private:
// anything.
class CacheValidity {
using Storage = std::underlying_type_t<RegisterSetType>;
+
private:
Storage m_valid_flags = 0;
- friend void NativeRegisterContextLinux_arm64::MakeValid(RegisterSetType
set);
+ friend void
+ NativeRegisterContextLinux_arm64::MakeValid(RegisterSetType set);
friend bool NativeRegisterContextLinux_arm64::IsValid(RegisterSetType set);
- public:
+
+ public:
void Invalidate(RegisterSetType set) {
m_valid_flags &= ~static_cast<Storage>(set);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/197113
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits