29 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
33 if (!(name_type_mask & eFunctionNameTypeFull)) {
36 name_to_match_against =
ConstString(mangled_die_name);
41 name_to_match_against = demangled_die_name;
51 uint32_t looking_for_nonmethods =
52 name_type_mask & ~(eFunctionNameTypeMethod | eFunctionNameTypeSelector);
53 if (!looking_for_nonmethods && parent_decl_ctx.
IsValid())
62 if (name_type_mask & eFunctionNameTypeFull && die.
GetMangledName() == name)
67 if (name_type_mask & eFunctionNameTypeSelector &&
71 bool looking_for_methods = name_type_mask & lldb::eFunctionNameTypeMethod;
72 bool looking_for_functions = name_type_mask & lldb::eFunctionNameTypeBase;
73 if (looking_for_methods || looking_for_functions) {
77 if ((looking_for_methods && looking_for_functions) ||
78 looking_for_methods == die.
IsMethod())
90 index.m_module.GetSymbolFile()->GetBackingSymbolFile())),
91 m_callback(callback), m_name(name) {}
95 return m_callback(die);
96 m_index.ReportInvalidDIERef(ref, m_name);
101 const llvm::AppleAcceleratorTable::Entry &entry)
const {
103 *entry.getDIESectionOffset()));
108 "the DWARF debug information has been modified (accelerator table had "
109 "bad die {0:x16} for '{1}')\n",
115 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
123 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
125 if (dwarf_decl_ctx == context)
126 return callback(die);
133 return ProcessTypeDIEMatchQuery(query, die, callback);
139 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
151 return callback(die);
154 std::vector<lldb_private::CompilerContext> die_context;
162 return callback(die);
167 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
175 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
178 return callback(die);
Represents a generic declaration context in a program.
A uniqued constant string class.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
A class that encapsulates name lookup information.
lldb::FunctionNameType GetNameTypeMask() const
lldb::LanguageType GetLanguageType() const
ConstString GetLookupName() const
bool NameMatchesLookupInfo(ConstString function_name, lldb::LanguageType language_type=lldb::eLanguageTypeUnknown) const
void ReportErrorIfModifyDetected(const char *format, Args &&...args)
static bool IsPossibleObjCMethodName(const char *name)
A class that contains all state required for type lookups.
bool GetModuleSearch() const
The m_context can be used in two ways: normal types searching with the context containing a stanadard...
bool HasLanguage() const
Returns true if any matching languages have been specified in this type matching object.
bool LanguageMatches(lldb::LanguageType language) const
Check if the language matches any languages that have been added to this match object.
ConstString GetTypeBasename() const
Get the type basename to use when searching the type indexes in each SymbolFile object.
bool ContextMatches(llvm::ArrayRef< lldb_private::CompilerContext > context) const
Check of a CompilerContext array from matching type from a symbol file matches the m_context.
bool GetSearchByMangledName() const
Returns true if the type query is supposed to treat the name to be searched as a mangled name.
Identifies a DWARF debug info entry within a given Module.
dw_offset_t die_offset() const
SymbolFileDWARF * GetDWARF() const
DWARFUnit * GetCU() const
void GetName(Stream &s) const
const char * GetMangledName(bool substitute_name_allowed=true) const
std::vector< CompilerContext > GetDeclContext() const
Return this DIE's decl context as it is needed to look up types in Clang modules.
DWARFDIE GetDIE(dw_offset_t die_offset) const
DWARFDeclContext GetDWARFDeclContext() const
std::vector< CompilerContext > GetTypeLookupContext() const
Get a context to a type so it can be looked up.
bool operator()(DIERef ref) const
DIERefCallbackImpl(const DWARFIndex &index, llvm::function_ref< bool(DWARFDIE die)> callback, llvm::StringRef name)
virtual void GetTypes(ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback)=0
bool ProcessTypeDIEMatchQuery(TypeQuery &query, DWARFDIE die, llvm::function_ref< bool(DWARFDIE die)> callback)
Check if the type die can meet the requirements of query.
bool ProcessFunctionDIE(const Module::LookupInfo &lookup_info, DWARFDIE die, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback)
Helper function implementing common logic for processing function dies.
virtual void GetNamespacesWithParents(ConstString name, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback)
Get namespace DIEs whose base name match.
virtual void GetFullyQualifiedType(const DWARFDeclContext &context, llvm::function_ref< bool(DWARFDIE die)> callback)
Finds all DIEs whose fully qualified name matches context.
void ReportInvalidDIERef(DIERef ref, llvm::StringRef name) const
bool ProcessNamespaceDieMatchParents(const CompilerDeclContext &parent_decl_ctx, DWARFDIE die, llvm::function_ref< bool(DWARFDIE die)> callback)
virtual void GetTypesWithQuery(TypeQuery &query, llvm::function_ref< bool(DWARFDIE die)> callback)
Get type DIEs meeting requires of query.
virtual void GetNamespaces(ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback)=0
bool GetFullyQualifiedTypeImpl(const DWARFDeclContext &context, DWARFDIE die, llvm::function_ref< bool(DWARFDIE die)> callback)
Implementation of GetFullyQualifiedType to check a single entry, shareable with derived classes.
static lldb::LanguageType GetLanguageFamily(DWARFUnit &unit)
Same as GetLanguage() but reports all C++ versions as C++ (no version).
ConstString ConstructFunctionDemangledName(const DWARFDIE &die)
static bool DIEInDeclContext(const CompilerDeclContext &parent_decl_ctx, const DWARFDIE &die, bool only_root_namespaces=false)
A class that represents a running process on the host machine.