LLDB mainline
|
This class tracks the state and results of a TypeQuery. More...
#include <Type.h>
Public Member Functions | |
TypeResults ()=default | |
Construct a type results object. | |
bool | InsertUnique (const lldb::TypeSP &type_sp) |
When types that match a TypeQuery are found, this API is used to insert the matching types. | |
bool | Done (const TypeQuery &query) const |
Check if the type matching has found all of the matches that it needs. | |
bool | AlreadySearched (lldb_private::SymbolFile *sym_file) |
Check if a SymbolFile object has already been searched by this type match object. | |
llvm::DenseSet< lldb_private::SymbolFile * > & | GetSearchedSymbolFiles () |
Access the set of searched symbol files. | |
lldb::TypeSP | GetFirstType () const |
TypeMap & | GetTypeMap () |
const TypeMap & | GetTypeMap () const |
Private Attributes | |
TypeMap | m_type_map |
Matching types get added to this map as type search continues. | |
llvm::DenseSet< lldb_private::SymbolFile * > | m_searched_symbol_files |
This set is used to track and make sure we only perform lookups in a symbol file one time. | |
This class tracks the state and results of a TypeQuery.
Any mutable state required for type lookups and the results are tracked in this object.
|
default |
Construct a type results object.
bool TypeResults::AlreadySearched | ( | lldb_private::SymbolFile * | sym_file | ) |
Check if a SymbolFile object has already been searched by this type match object.
This function will add sym_file to the set of SymbolFile objects if it isn't already in the set and return false. Returns true if sym_file was already in the set and doesn't need to be searched.
Any clients that search for types should first check that the symbol file has not already been searched. If this function returns true, the type search function should early return to avoid duplicating type searchihng efforts.
[in] | sym_file | A SymbolFile pointer that will be used to track which symbol files have already been searched. |
Definition at line 169 of file Type.cpp.
References m_searched_symbol_files.
Referenced by lldb_private::SymbolFileCTF::FindTypes(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindTypes(), lldb_private::npdb::SymbolFileNativePDB::FindTypes(), SymbolFilePDB::FindTypes(), and DWARFASTParserClang::ParseTypeFromClangModule().
bool TypeResults::Done | ( | const TypeQuery & | query | ) | const |
Check if the type matching has found all of the matches that it needs.
Definition at line 179 of file Type.cpp.
References lldb_private::TypeMap::Empty(), lldb_private::TypeQuery::GetFindOne(), and m_type_map.
Referenced by lldb_private::SymbolFileCTF::FindTypes(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindTypes(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::FindTypes(), lldb_private::npdb::SymbolFileNativePDB::FindTypes(), SymbolFilePDB::FindTypes(), and lldb_private::ModuleList::FindTypes().
|
inline |
Definition at line 351 of file Type.h.
References lldb_private::TypeMap::FirstType(), and m_type_map.
Referenced by CommandObjectMemoryRead::DoExecute(), lldb_private::ClangASTSource::FindExternalVisibleDecls(), lldb::SBModule::FindFirstType(), lldb::SBTarget::FindFirstType(), and lldb_private::ItaniumABILanguageRuntime::GetTypeInfo().
|
inline |
Access the set of searched symbol files.
Definition at line 347 of file Type.h.
References m_searched_symbol_files.
Referenced by DWARFASTParserClang::ParseTypeFromClangModule().
|
inline |
Definition at line 352 of file Type.h.
References m_type_map.
Referenced by lldb_private::Language::ImageListTypeScavenger::Find_Impl(), lldb_private::ClangASTSource::FindCompleteType(), lldb::SBModule::FindTypes(), lldb::SBTarget::FindTypes(), lldb_private::TypeFormatImpl_EnumType::FormatObject(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfo(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), LookupTypeHere(), LookupTypeInModule(), and DWARFASTParserClang::ParseTypeFromClangModule().
|
inline |
Definition at line 353 of file Type.h.
References m_type_map.
bool TypeResults::InsertUnique | ( | const lldb::TypeSP & | type_sp | ) |
When types that match a TypeQuery are found, this API is used to insert the matching types.
Definition at line 173 of file Type.cpp.
References lldb_private::TypeMap::InsertUnique(), and m_type_map.
Referenced by lldb_private::SymbolFileCTF::FindTypes(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindTypes(), lldb_private::npdb::SymbolFileNativePDB::FindTypes(), and SymbolFilePDB::FindTypes().
|
private |
This set is used to track and make sure we only perform lookups in a symbol file one time.
Definition at line 360 of file Type.h.
Referenced by AlreadySearched(), and GetSearchedSymbolFiles().
|
private |
Matching types get added to this map as type search continues.
Definition at line 357 of file Type.h.
Referenced by Done(), GetFirstType(), GetTypeMap(), and InsertUnique().