[Lldb-commits] [PATCH] D101237: [lldb] Fix [[no_unique_address]] and libstdc++ 11's std::unique_ptr
David Blaikie via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Apr 24 16:14:57 PDT 2021
dblaikie added a subscriber: aprantl.
dblaikie added a comment.
> As DWARF does not contain the [[no_unique_address]] attribute the patch adds it to every record member, could it be a problem?
Given that no_unique_address changes the layout of data structures ( https://clang.llvm.org/docs/AttributeReference.html#no-unique-address ) adding it to a member that doesn't actually have it specified I believe would break layout of structures (have you tried it on the lldb test suite/experimented with examples? I would expect a lot of tests to fail if I'm understanding this correctly)
If it were correct to interpret every field as having no_unique_address, then we wouldn't need users to write the attribute/wouldn't need the attribute, right?
So I suspect the only way to get the layout right is to add the information to the DWARF in some way (probably an extension form/propose it for standardization)?
(@aprantl ?)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101237/new/
https://reviews.llvm.org/D101237
More information about the lldb-commits
mailing list