Skip to content

Commit 42b122b

Browse files
authored
Merge pull request #3442 from adrian-prantl/sve5
Work around outdated system header files on Amazon Linux (take 5)
2 parents 6743226 + 3ffe24f commit 42b122b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
6565
#if LLDB_HAVE_USER_SVE_HEADER
6666
struct user_sve_header sve_header;
6767
#else
68-
struct sve_header {};
68+
struct {} sve_header;
6969
#endif
7070
struct iovec ioVec;
7171
ioVec.iov_base = &sve_header;
@@ -395,6 +395,7 @@ Status NativeRegisterContextLinux_arm64::WriteRegister(
395395
if (GetRegisterInfo().IsSVERegVG(reg)) {
396396
uint64_t vg_value = reg_value.GetAsUInt64();
397397

398+
#if LLDB_HAVE_USER_SVE_HEADER
398399
if (sve_vl_valid(vg_value * 8)) {
399400
if (m_sve_header_is_valid && vg_value == GetSVERegVG())
400401
return error;
@@ -408,9 +409,11 @@ Status NativeRegisterContextLinux_arm64::WriteRegister(
408409
if (m_sve_header_is_valid && vg_value == GetSVERegVG())
409410
return error;
410411
}
411-
412+
#endif
412413
return Status("SVE vector length update failed.");
414+
#if LLDB_HAVE_USER_SVE_HEADER
413415
}
416+
#endif
414417

415418
// If target supports SVE but currently in FPSIMD mode.
416419
if (m_sve_state == SVEState::FPSIMD) {

0 commit comments

Comments
 (0)