[Lldb-commits] [PATCH] D70646: Move non-DWARF code: `DWARFUnit` -> `SymbolFileDWARF`
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 31 06:33:17 PST 2020
jankratochvil marked 2 inline comments as done.
jankratochvil added a comment.
Checked in, thanks for the review.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3987-4008
+ DWARFASTParser *dwarf_ast = GetDWARFParser(*die.GetCU());
+ if (dwarf_ast)
+ return dwarf_ast->GetDeclForUIDFromDWARF(die);
+ else
+ return CompilerDecl();
+}
+
----------------
labath wrote:
> [[ http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return | Don't use else after return ]]. In fact, you might as well fold the GetDWARFParser call into the if condition (`if (DWARFASTParser *parser = ...) parser->...`)
This was only moving the code, I did not expect to also refactor it. But I have thus made these code cleanups which I found.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70646/new/
https://reviews.llvm.org/D70646
More information about the lldb-commits
mailing list