[Lldb-commits] [lldb] r367275 - [NFC] avoid AlignedCharArray in lldb
JF Bastien via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 29 16:17:08 PDT 2019
Author: jfb
Date: Mon Jul 29 16:17:08 2019
New Revision: 367275
URL: http://llvm.org/viewvc/llvm-project?rev=367275&view=rev
Log:
[NFC] avoid AlignedCharArray in lldb
As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.
Modified:
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp?rev=367275&r1=367274&r2=367275&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp Mon Jul 29 16:17:08 2019
@@ -424,7 +424,7 @@ bool RegisterContextDarwin_arm64::ReadRe
case fpu_v29:
case fpu_v30:
case fpu_v31:
- value.SetBytes(fpu.v[reg - fpu_v0].bytes.buffer, reg_info->byte_size,
+ value.SetBytes(fpu.v[reg - fpu_v0].bytes, reg_info->byte_size,
endian::InlHostByteOrder());
break;
@@ -616,7 +616,7 @@ bool RegisterContextDarwin_arm64::WriteR
case fpu_v29:
case fpu_v30:
case fpu_v31:
- ::memcpy(fpu.v[reg - fpu_v0].bytes.buffer, value.GetBytes(),
+ ::memcpy(fpu.v[reg - fpu_v0].bytes, value.GetBytes(),
value.GetByteSize());
break;
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h?rev=367275&r1=367274&r2=367275&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h Mon Jul 29 16:17:08 2019
@@ -73,7 +73,7 @@ public:
};
struct VReg {
- llvm::AlignedCharArray<16, 16> bytes;
+ alignas(16) char bytes[16];
};
// mirrors <mach/arm/thread_status.h> arm_neon_state64_t
More information about the lldb-commits
mailing list