9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DEBUGNAMESDWARFINDEX_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DEBUGNAMESDWARFINDEX_H
17#include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h"
24 static llvm::Expected<std::unique_ptr<DebugNamesDWARFIndex>>
43 ConstString class_name,
bool must_be_implementation,
77 std::unique_ptr<llvm::DWARFDebugNames> debug_names_up,
122 std::optional<DWARFTypeUnit *>
131 llvm::ArrayRef<DebugNames::Entry> parent_entries)
const;
134 llvm::ArrayRef<DebugNames::Entry> parent_entries)
const;
154 llvm::ArrayRef<DebugNames::Entry> parent_chain)
const;
158 const DebugNames::Entry &entry)
const;
160 llvm::SmallVector<CompilerContext>
164 const DebugNames::NameIndex &ni,
165 llvm::StringRef name);
168 static llvm::DenseSet<uint64_t>
static llvm::raw_ostream & error(Stream &strm)
Represents a generic declaration context in a program.
A uniqued constant string class.
A class that encapsulates name lookup information.
A class that describes an executable image and its associated object and symbol files.
A stream class that can stream formatted output to a file.
A class that contains all state required for type lookups.
DWARFIndex(Module &module)
llvm::SmallVector< CompilerContext > GetTypeQueryParentContexts(TypeQuery &query)
DebugNamesDWARFIndex(Module &module, std::unique_ptr< llvm::DWARFDebugNames > debug_names_up, DWARFDataExtractor debug_names_data, DWARFDataExtractor debug_str_data, SymbolFileDWARF &dwarf)
static llvm::Expected< std::unique_ptr< DebugNamesDWARFIndex > > Create(Module &module, DWARFDataExtractor debug_names, DWARFDataExtractor debug_str, SymbolFileDWARF &dwarf)
DWARFDataExtractor m_debug_names_data
void GetObjCMethods(ConstString class_name, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
IterationAction ProcessEntry(const DebugNames::Entry &entry, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
void GetTypes(ConstString name, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
static llvm::DenseSet< uint64_t > GetTypeUnitSignatures(const DebugNames &debug_names)
static void MaybeLogLookupError(llvm::Error error, const DebugNames::NameIndex &ni, llvm::StringRef name)
DWARFDIE GetDIE(const DebugNames::Entry &entry) const
std::optional< DWARFTypeUnit * > GetForeignTypeUnit(const DebugNames::Entry &entry) const
Checks if an entry is a foreign TU and fetch the type unit.
ManualDWARFIndex m_fallback
bool WithinParentChain(llvm::ArrayRef< CompilerContext > parent_contexts, llvm::ArrayRef< DebugNames::Entry > parent_chain) const
Returns true if parent_contexts entries are within parent_chain.
void GetFullyQualifiedType(const DWARFDeclContext &context, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
Uses DWARF5's IDX_parent fields, when available, to speed up this query.
void GetTypesWithQuery(TypeQuery &query, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
Get type DIEs meeting requires of query.
void GetNamespacesWithParents(ConstString name, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
Get namespace DIEs whose base name match.
llvm::DWARFDebugNames DebugNames
void Dump(Stream &s) override
void GetNamespaces(ConstString name, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
bool SameAsEntryContext(const CompilerContext &query_context, const DebugNames::Entry &entry) const
Returns true if .debug_names pool entry entry matches query_context.
DWARFDataExtractor m_debug_str_data
void GetFunctions(const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
void GetGlobalVariables(ConstString basename, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
Finds global variables with the given base name.
DWARFDebugInfo & m_debug_info
void GetCompleteObjCClass(ConstString class_name, bool must_be_implementation, llvm::function_ref< IterationAction(DWARFDIE die)> callback) override
bool SameParentChain(llvm::ArrayRef< llvm::StringRef > parent_names, llvm::ArrayRef< DebugNames::Entry > parent_entries) const
Returns true if parent_entries have identical names to parent_names.
static llvm::DenseSet< dw_offset_t > GetUnits(const DebugNames &debug_names)
DWARFUnit * GetNonSkeletonUnit(const DebugNames::Entry &entry) const
std::unique_ptr< DebugNames > m_debug_names_up
IterationAction
Useful for callbacks whose return type indicates whether to continue iteration or short-circuit.
CompilerContext allows an array of these items to be passed to perform detailed lookups in SymbolVend...