[Lldb-commits] [PATCH] D72953: Fix the handling of unnamed bit-fields when parsing DWARF
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 23 15:11:29 PST 2020
aprantl added inline comments.
================
Comment at: lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py:15
+ # Call super's setUp().
+ TestBase.setUp(self)
+ # Find the line number to break inside main().
----------------
Is this needed?
================
Comment at: lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py:17
+ # Find the line number to break inside main().
+ self.line = line_number('main.cpp', '// Set break point at this line.')
+
----------------
Is this needed?
================
Comment at: lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp:3
+#include <stdio.h>
+#include <string.h>
+
----------------
teemperor wrote:
> Do we need stdio and string.h?
Since it's only used in bitfields we probably don't even need `uint64_t`? It speeds up compilation of the testcase quite a bit if the std module doesn't have to be built.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h:181
+ void SetIsBitfield(bool flag) { is_bitfield = flag; }
+ bool IsBitfield() { return is_bitfield; }
----------------
This is personal taste, but for a `struct` I probably wouldn't even bother writing a trivial accessor. Up to you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72953/new/
https://reviews.llvm.org/D72953
More information about the lldb-commits
mailing list