[Lldb-commits] [PATCH] D136584: [LLDB] Check that RegisterInfo and ContextInfo are trivial
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 24 03:16:36 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8d06ef565818: [LLDB] Check that RegisterInfo and ContextInfo are trivial (authored by DavidSpickett).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136584/new/
https://reviews.llvm.org/D136584
Files:
lldb/include/lldb/Core/EmulateInstruction.h
lldb/include/lldb/lldb-private-types.h
Index: lldb/include/lldb/lldb-private-types.h
===================================================================
--- lldb/include/lldb/lldb-private-types.h
+++ lldb/include/lldb/lldb-private-types.h
@@ -15,6 +15,8 @@
#include "llvm/ADT/ArrayRef.h"
+#include <type_traits>
+
namespace llvm {
namespace sys {
class DynamicLibrary;
@@ -70,6 +72,8 @@
byte_size);
}
};
+static_assert(std::is_trivial<RegisterInfo>::value,
+ "RegisterInfo must be trivial.");
/// Registers are grouped into register sets
struct RegisterSet {
Index: lldb/include/lldb/Core/EmulateInstruction.h
===================================================================
--- lldb/include/lldb/Core/EmulateInstruction.h
+++ lldb/include/lldb/Core/EmulateInstruction.h
@@ -189,7 +189,7 @@
public:
enum InfoType GetInfoType() const { return info_type; }
- union {
+ union ContextInfo {
struct RegisterPlusOffset {
RegisterInfo reg; // base register
int64_t signed_offset; // signed offset added to base register
@@ -241,6 +241,8 @@
uint32_t isa;
} info;
+ static_assert(std::is_trivial<ContextInfo>::value,
+ "ContextInfo must be trivial.");
Context() = default;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136584.470102.patch
Type: text/x-patch
Size: 1289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221024/0456a300/attachment.bin>
More information about the lldb-commits
mailing list