This is an archive of the discontinued LLVM Phabricator instance.

[lldb][DWARFASTParserClang][NFC] Extract condition for unnamed bitfield creation into helper function
ClosedPublic

Authored by Michael137 on May 15 2023, 9:51 AM.

Details

Summary

This patch adds a new private helper
DWARFASTParserClang::ShouldCreateUnnamedBitfield which
ParseSingleMember whether we should fill the current gap
in a structure layout with unnamed bitfields.

Extracting this logic will allow us to add additional
conditions in upcoming patches without jeoperdizing readability
of ParseSingleMember.

We also store some of the boolean conditions in local variables
to make the intent more obvious.

Diff Detail

Event Timeline

Michael137 created this revision.May 15 2023, 9:51 AM
Herald added a project: Restricted Project. · View Herald Transcript
Michael137 requested review of this revision.May 15 2023, 9:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2023, 9:51 AM
aprantl accepted this revision.May 15 2023, 10:03 AM
aprantl added inline comments.
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
239

Doxygen comment?

This revision is now accepted and ready to land.May 15 2023, 10:03 AM
  • Add doxygen comment