[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
[lldb][NFC] Add size tests for empty records with alignment and with empty membersThis came up during the Windows bot failure discussing after D105471 . Seealso 3d9a9fa6911a5228ce799a7c639e94d3226
[lldb][NFC] Add size tests for empty records with alignment and with empty membersThis came up during the Windows bot failure discussing after D105471 . Seealso 3d9a9fa6911a5228ce799a7c639e94d322678934 .
[lldb] Generalize empty record size computation to avoid giving empty C++ structs a size of 0C doesn't allow empty structs but Clang/GCC support them and give them a size of 0.LLDB implements thi
[lldb] Generalize empty record size computation to avoid giving empty C++ structs a size of 0C doesn't allow empty structs but Clang/GCC support them and give them a size of 0.LLDB implements this by checking the tag kind and if it's `DW_TAG_structure_type` thenwe give it a size of 0 via an empty external RecordLayout. This is done because ourinternal TypeSystem is always in C++ mode (which means we would give them a sizeof 1).The current check for when we have this special case is currently too lax as types with`DW_TAG_structure_type` can also occur in C++ with types defined using the `struct`keyword. This means that in a C++ program with `struct Empty{};`, LLDB would return`0` for `sizeof(Empty)` even though the correct size is 1.This patch removes this special case and replaces it with a generic approach that justassigns empty structs the byte_size as specified in DWARF. The GCC/Clang specialcase is handles as they both emit an explicit `DW_AT_byte_size` of 0. And if anothercompiler decides to use a different byte size for this case then this should also behandled by the same code as long as that information is provided via `DW_AT_byte_size`.Reviewed By: werat, shafikDifferential Revision: https://reviews.llvm.org/D105471