[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Sun Jun 23 02:00:26 PDT 2024


Michael137 wrote:

> It's not that hard to compute "no-data": non-RecordDecls are never no-data, RecordDecls are no-data if they don't have a vtable pointer (isDynamicClass()), and all fields are no-data. We can save it in the CGRecordLayout.
> 
> Assuming that's the route we want to go, of course, as opposed to just making LLDB add no_unique_address markings to fields.

Turns out there's `CodeGen::isEmptyField` which seems usable for this purpose. Created a draft PR here: https://github.com/llvm/llvm-project/pull/96422 for now

https://github.com/llvm/llvm-project/pull/93809


More information about the lldb-commits mailing list