summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-06-07 10:35:28 +0000
committerPavel Labath <labath@google.com>2018-06-07 10:35:28 +0000
commit452bd87cc478f4d017c5c11bb409287335f40f30 (patch)
treea6d29789b10abdc97554509b7994f40d16031777 /lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
parent697300bd4f94d79f51f4a496bec7bde93661f7f1 (diff)
downloadbcm5719-llvm-452bd87cc478f4d017c5c11bb409287335f40f30.tar.gz
bcm5719-llvm-452bd87cc478f4d017c5c11bb409287335f40f30.zip
DebugNamesDWARFIndex: Add support for partial indexes
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. Reviewers: JDevlieghere, clayborg Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D47832 llvm-svn: 334185
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
index 9ce446a5af6..79ab1d95b38 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
@@ -12,12 +12,15 @@
#include "Plugins/SymbolFile/DWARF/DWARFIndex.h"
#include "Plugins/SymbolFile/DWARF/NameToDIE.h"
+#include "llvm/ADT/DenseSet.h"
namespace lldb_private {
class ManualDWARFIndex : public DWARFIndex {
public:
- ManualDWARFIndex(Module &module, DWARFDebugInfo *debug_info)
- : DWARFIndex(module), m_debug_info(debug_info) {}
+ ManualDWARFIndex(Module &module, DWARFDebugInfo *debug_info,
+ llvm::DenseSet<dw_offset_t> units_to_avoid = {})
+ : DWARFIndex(module), m_debug_info(debug_info),
+ m_units_to_avoid(std::move(units_to_avoid)) {}
void Preload() override { Index(); }
@@ -62,6 +65,8 @@ private:
/// Non-null value means we haven't built the index yet.
DWARFDebugInfo *m_debug_info;
+ /// Which dwarf units should we skip while building the index.
+ llvm::DenseSet<dw_offset_t> m_units_to_avoid;
IndexSet m_set;
};
OpenPOWER on IntegriCloud