[Lldb-commits] [PATCH] D40212: DWZ 02/12: refactor: Unify+simplify DWARFCompileUnit ctor+Clear() into in-class initializers + Extract()
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 29 13:11:57 PST 2017
jankratochvil added inline comments.
================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp:248-249
- while (cu->Extract(dwarf2Data->get_debug_info_data(), &offset)) {
+ for (;;) {
+ DWARFCompileUnitSP cu = DWARFCompileUnit::Extract(dwarf2Data, &offset);
+ if (cu.get() == NULL)
----------------
clayborg wrote:
> Might be cleaner to do:
> ```
> DWARFCompileUnitSP cu;
> while ((cu = DWARFCompileUnit::Extract(dwarf2Data, &offset))) {
> ```
>
I did not know LLVM style can be this brief, that is sure better, implemented.
https://reviews.llvm.org/D40212
More information about the lldb-commits
mailing list