[Lldb-commits] [lldb] [LLDB] Don't ignore artificial variables and members for coroutines (PR #70779)
Haojian Wu via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 9 05:28:57 PST 2023
================
@@ -3059,9 +3059,8 @@ void DWARFASTParserClang::ParseSingleMember(
// This needs to be done after updating FieldInfo which keeps track of where
// field start/end so we don't later try to fill the space of this
// artificial member with (unnamed bitfield) padding.
- // FIXME: This check should verify that this is indeed an artificial member
- // we are supposed to ignore.
- if (attrs.is_artificial) {
+ if (attrs.is_artificial &&
+ TypeSystemClang::ShouldIgnoreArtificialField(attrs.name)) {
----------------
hokein wrote:
This function is only used to parse `DW_TAG_MEMBER`. I took a look on all related usages of `createMemberType` with `llvm::DINode::FlagArtificial` in the llvm source repo:
- vptr pointer: https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CGDebugInfo.cpp#L2426
- coroutines:
- https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Coroutines/CoroFrame.cpp#L1058
- https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Coroutines/CoroFrame.cpp#L1234
so two cases are virtual pointer, and coroutines frames. And to my best knowledge, not ignoring coroutine artificial fields should be fine, the coroutine frame is just a regular plain struct .
https://github.com/llvm/llvm-project/pull/70779
More information about the lldb-commits
mailing list