This is an archive of the discontinued LLVM Phabricator instance.

DebugNamesDWARFIndex: Add support for partial indexes
ClosedPublic

Authored by labath on Jun 6 2018, 9:45 AM.

Details

Summary

It possible that a single module has indexed and non-indexed compile
units. In this case, we can use the fast indexed lookup for the first
ones and fall back to the manual index for the others.

This patch implements this functionality by adding a units_to_avoid
argument to the ManualDWARFIndex constructor. Any units present in that
list will be ignored for the purposes of manual index. Individual
DebugNamesDWARFIndex then always consult both the manual fallback index
as well as the index in the .debug_names section.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Jun 6 2018, 9:45 AM
clayborg accepted this revision.Jun 6 2018, 9:57 AM

Just one nit you can choose to fix or not.

source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
39–41 ↗(On Diff #150155)

Simpler code:

if (!unit || m_units_to_avoid.count(unit->GetOffset())
  continue;
This revision is now accepted and ready to land.Jun 6 2018, 9:57 AM
This revision was automatically updated to reflect the committed changes.