[Lldb-commits] [PATCH] D83433: Fix how we handle bit-fields for Objective-C when creating an AST
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 8 15:03:08 PDT 2020
shafik created this revision.
shafik added reviewers: teemperor, jingham, aprantl.
Currently expressions dealing with bit-fields in Objective-C objects is pretty broken. When generating debug-info for Objective-C bit-fields we don't generate offsets because the Objective-C runtime is supposed to handle generating the offsets for us.
When we parse the DWARF we expect to always have valid bit offsets and if we don't we treat that as an error and stop adding bit-fields to the AST.
Later on when we do a name lookup we don't find the `ObjCIvarDecl` in the `ObjCInterfaceDecl` in some cases since we never added it and then we don't go to the runtime to obtain the offset.
This will fix how we handle bit-fields for the Objective-C case and add tests to verify this fix but also to documents areas that still don't work and will be addressed in follow-up PRs.
https://reviews.llvm.org/D83433
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/test/API/lang/objc/bitfield_ivars/Makefile
lldb/test/API/lang/objc/bitfield_ivars/TestBitfieldIvars.py
lldb/test/API/lang/objc/bitfield_ivars/main.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83433.276558.patch
Type: text/x-patch
Size: 4535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200708/2dea74d9/attachment.bin>
More information about the lldb-commits
mailing list