34 if (!(name_type_mask & eFunctionNameTypeFull)) {
37 name_to_match_against =
ConstString(mangled_die_name);
42 name_to_match_against = demangled_die_name;
52 uint32_t looking_for_nonmethods =
53 name_type_mask & ~(eFunctionNameTypeMethod | eFunctionNameTypeSelector);
54 if (!looking_for_nonmethods && parent_decl_ctx.
IsValid())
63 if (name_type_mask & eFunctionNameTypeFull && die.
GetMangledName() == name)
68 if (name_type_mask & eFunctionNameTypeSelector &&
72 bool looking_for_methods = name_type_mask & lldb::eFunctionNameTypeMethod;
73 bool looking_for_functions = name_type_mask & lldb::eFunctionNameTypeBase;
74 if (looking_for_methods || looking_for_functions) {
78 if ((looking_for_methods && looking_for_functions) ||
79 looking_for_methods == die.
IsMethod())
92 index.
m_module.GetSymbolFile()->GetBackingSymbolFile())),
103 const llvm::AppleAcceleratorTable::Entry &entry)
const {
105 *entry.getDIESectionOffset()));
109 m_module.ReportErrorIfModifyDetected(
110 "the DWARF debug information has been modified (accelerator table had "
111 "bad die {0:x16} for '{1}')\n",
127 if (dwarf_decl_ctx == context)
128 return callback(die);
136 return ProcessTypeDIEMatchQuery(query, die, callback);
154 return callback(die);
157 std::vector<lldb_private::CompilerContext> die_context;
165 return callback(die);
181 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
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(bool derive_template_names=false) const
Return this DIE's decl context as it is needed to look up types in Clang modules.
DWARFDeclContext GetDWARFDeclContext() const
std::vector< CompilerContext > GetTypeLookupContext(bool derive_template_names=false) const
Get a context to a type so it can be looked up.
SymbolFileDWARF & m_dwarf
DIERefCallbackImpl(const DWARFIndex &index, llvm::function_ref< IterationAction(DWARFDIE die)> callback, llvm::StringRef name)
const llvm::StringRef m_name
IterationAction operator()(DIERef ref) const
const llvm::function_ref< IterationAction(DWARFDIE die)> m_callback
const DWARFIndex & m_index
IterationAction GetFullyQualifiedTypeImpl(const DWARFDeclContext &context, DWARFDIE die, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
Implementation of GetFullyQualifiedType to check a single entry, shareable with derived classes.
virtual void GetFullyQualifiedType(const DWARFDeclContext &context, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
Finds all DIEs whose fully qualified name matches context.
virtual void GetTypesWithQuery(TypeQuery &query, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
Get type DIEs meeting requires of query.
virtual void GetNamespaces(ConstString name, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
IterationAction ProcessFunctionDIE(const Module::LookupInfo &lookup_info, DWARFDIE die, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
Helper function implementing common logic for processing function dies.
void ReportInvalidDIERef(DIERef ref, llvm::StringRef name) const
virtual void GetNamespacesWithParents(ConstString name, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
Get namespace DIEs whose base name match.
virtual void GetTypes(ConstString name, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
DWARFIndex(Module &module)
IterationAction ProcessTypeDIEMatchQuery(TypeQuery &query, DWARFDIE die, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
Check if the type die can meet the requirements of query.
IterationAction ProcessNamespaceDieMatchParents(const CompilerDeclContext &parent_decl_ctx, DWARFDIE die, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
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.
IterationAction
Useful for callbacks whose return type indicates whether to continue iteration or short-circuit.