[Lldb-commits] [PATCH] D40212: DWZ 02/12: refactor: Unify+simplify DWARFCompileUnit ctor+Clear() into in-class initializers + Extract()
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 27 10:07:43 PST 2017
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.
Won't hold up the checkin for the cleaner while loop, but feel free to fix that and checkin if it works.
================
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)
----------------
Might be cleaner to do:
```
DWARFCompileUnitSP cu;
while ((cu = DWARFCompileUnit::Extract(dwarf2Data, &offset))) {
```
https://reviews.llvm.org/D40212
More information about the lldb-commits
mailing list