[Lldb-commits] [lldb] r319402 - refactor: Simplify loop with DWARFCompileUnit::Extract
Jan Kratochvil via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 29 21:49:02 PST 2017
Author: jankratochvil
Date: Wed Nov 29 21:49:02 2017
New Revision: 319402
URL: http://llvm.org/viewvc/llvm-project?rev=319402&view=rev
Log:
refactor: Simplify loop with DWARFCompileUnit::Extract
Forgotten small simplification in D40212.
Differential revision: https://reviews.llvm.org/D40635
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp?rev=319402&r1=319401&r2=319402&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp Wed Nov 29 21:49:02 2017
@@ -97,12 +97,8 @@ void DWARFDebugInfo::ParseCompileUnitHea
if (m_compile_units.empty()) {
if (m_dwarf2Data != NULL) {
lldb::offset_t offset = 0;
- for (;;) {
- DWARFCompileUnitSP cu_sp =
- DWARFCompileUnit::Extract(m_dwarf2Data, &offset);
- if (cu_sp.get() == NULL)
- break;
-
+ DWARFCompileUnitSP cu_sp;
+ while ((cu_sp = DWARFCompileUnit::Extract(m_dwarf2Data, &offset))) {
m_compile_units.push_back(cu_sp);
offset = cu_sp->GetNextCompileUnitOffset();
More information about the lldb-commits
mailing list