[Lldb-commits] [PATCH] D77326: 1/2: [nfc] [lldb] Unindent code
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 6 14:10:43 PDT 2020
aprantl accepted this revision.
aprantl added inline comments.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2016
+ for (size_t i = 0; i < num_matches; ++i) {
+ const DIERef &die_ref = method_die_offsets[i];
DWARFDebugInfo &debug_info = dwarf->DebugInfo();
----------------
Can this be made into a range-based for loop in a separate commit?
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2057
- if (die) {
- switch (die.Tag()) {
- default:
- case DW_TAG_subprogram:
- case DW_TAG_inlined_subroutine:
- case DW_TAG_try_block:
- case DW_TAG_catch_block:
- break;
+ for (size_t i = 0; i < num_die_matches; ++i) {
+ const DIERef &die_ref = die_offsets[i];
----------------
same here (later)
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2915
+ if (!log)
+ continue;
+ std::string qualified_name;
----------------
These two continues IMO are a bit confusing to read this way. Perhaps in this case an if (log) block with just one continue at the end is easier to read. Up to you.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2951
+ type_sp = resolved_type->shared_from_this();
+ break;
}
----------------
I think I'd prefer a return over a break, (iff they are equivalent!).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77326/new/
https://reviews.llvm.org/D77326
More information about the lldb-commits
mailing list