[Lldb-commits] [PATCH] D60254: Add dropped ManualDWARFIndex assert()

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 4 00:50:17 PDT 2019


jankratochvil created this revision.
jankratochvil added a reviewer: labath.
jankratochvil added a project: LLDB.
Herald added subscribers: arphaman, aprantl.

D47253 <https://reviews.llvm.org/D47253> dropped this assertion. So either add it back by this patch or otherwise I will remove currently unused `SymbolFileDWARF::GetBaseCompileUnit`.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D60254

Files:
  lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp


Index: lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -92,6 +92,9 @@
 }
 
 void ManualDWARFIndex::IndexUnit(DWARFUnit &unit, IndexSet &set) {
+  assert(!unit.GetSymbolFileDWARF()->GetBaseCompileUnit() &&
+      "DWARFUnit associated with .dwo or .dwp should not be indexed directly");
+
   Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS);
 
   if (log) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60254.193669.patch
Type: text/x-patch
Size: 572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190404/eda18058/attachment.bin>


More information about the lldb-commits mailing list