[Lldb-commits] [lldb] r333517 - Fix return value of DWARFUnit::ExtractDIEsIfNeeded()

Jan Kratochvil via lldb-commits lldb-commits at lists.llvm.org
Wed May 30 01:54:46 PDT 2018


Author: jankratochvil
Date: Wed May 30 01:54:46 2018
New Revision: 333517

URL: http://llvm.org/viewvc/llvm-project?rev=333517&view=rev
Log:
Fix return value of DWARFUnit::ExtractDIEsIfNeeded()

This is a leftover regression from: https://reviews.llvm.org/D46810

Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp?rev=333517&r1=333516&r2=333517&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp Wed May 30 01:54:46 2018
@@ -192,13 +192,12 @@ bool DWARFUnit::ExtractDIEsIfNeeded() {
 
   ExtractDIEsEndCheck(offset);
 
-  if (!m_dwo_symbol_file)
-    return m_die_array.size();
+  if (m_dwo_symbol_file) {
+    DWARFUnit *dwo_cu = m_dwo_symbol_file->GetCompileUnit();
+    dwo_cu->ExtractDIEsIfNeeded();
+  }
 
-  DWARFUnit *dwo_cu = m_dwo_symbol_file->GetCompileUnit();
-  size_t dwo_die_count = dwo_cu->ExtractDIEsIfNeeded();
-  return m_die_array.size() + dwo_die_count -
-         1; // We have 2 CU die, but we want to count it only as one
+  return true;
 }
 
 //--------------------------------------------------------------------------




More information about the lldb-commits mailing list