[Lldb-commits] [lldb] [lldb] Add static_assert to catch increases to size of Symbol (PR #200919)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 1 12:50:40 PDT 2026
================
@@ -360,6 +360,14 @@ class Symbol : public SymbolContextScope {
} // namespace lldb_private
+#if __SIZEOF_POINTER__ == 8
+static_assert(sizeof(lldb_private::Symbol) == 80,
+ "Symbol size must be kept to a minimum");
+#elif __SIZEOF_POINTER__ == 4
+static_assert(sizeof(lldb_private::Symbol) == 52,
+ "Symbol size must be kept to a minimum");
----------------
JDevlieghere wrote:
Would it make sense do the math: `x + y * sizeof(void*)`?
https://github.com/llvm/llvm-project/pull/200919
More information about the lldb-commits
mailing list