LLDB mainline
|
#include <PDBASTParser.h>
Public Member Functions | |
PDBASTParser (lldb_private::TypeSystemClang &ast) | |
~PDBASTParser () | |
lldb::TypeSP | CreateLLDBTypeFromPDBType (const llvm::pdb::PDBSymbol &type) |
bool | CompleteTypeFromPDB (lldb_private::CompilerType &compiler_type) |
clang::Decl * | GetDeclForSymbol (const llvm::pdb::PDBSymbol &symbol) |
clang::DeclContext * | GetDeclContextForSymbol (const llvm::pdb::PDBSymbol &symbol) |
clang::DeclContext * | GetDeclContextContainingSymbol (const llvm::pdb::PDBSymbol &symbol) |
void | ParseDeclsForDeclContext (const clang::DeclContext *decl_context) |
clang::NamespaceDecl * | FindNamespaceDecl (const clang::DeclContext *parent, llvm::StringRef name) |
lldb_private::ClangASTImporter & | GetClangASTImporter () |
Private Types | |
typedef llvm::DenseMap< clang::CXXRecordDecl *, lldb::user_id_t > | CXXRecordDeclToUidMap |
typedef llvm::DenseMap< lldb::user_id_t, clang::Decl * > | UidToDeclMap |
typedef std::set< clang::NamespaceDecl * > | NamespacesSet |
typedef llvm::DenseMap< clang::DeclContext *, NamespacesSet > | ParentToNamespacesMap |
typedef llvm::DenseMap< clang::DeclContext *, lldb::user_id_t > | DeclContextToUidMap |
typedef llvm::pdb::ConcreteSymbolEnumerator< llvm::pdb::PDBSymbolData > | PDBDataSymbolEnumerator |
typedef llvm::pdb::ConcreteSymbolEnumerator< llvm::pdb::PDBSymbolTypeBaseClass > | PDBBaseClassSymbolEnumerator |
typedef llvm::pdb::ConcreteSymbolEnumerator< llvm::pdb::PDBSymbolFunc > | PDBFuncSymbolEnumerator |
Private Member Functions | |
bool | AddEnumValue (lldb_private::CompilerType enum_type, const llvm::pdb::PDBSymbolData &data) |
bool | CompleteTypeFromUDT (lldb_private::SymbolFile &symbol_file, lldb_private::CompilerType &compiler_type, llvm::pdb::PDBSymbolTypeUDT &udt) |
void | AddRecordMembers (lldb_private::SymbolFile &symbol_file, lldb_private::CompilerType &record_type, PDBDataSymbolEnumerator &members_enum, lldb_private::ClangASTImporter::LayoutInfo &layout_info) |
void | AddRecordBases (lldb_private::SymbolFile &symbol_file, lldb_private::CompilerType &record_type, int record_kind, PDBBaseClassSymbolEnumerator &bases_enum, lldb_private::ClangASTImporter::LayoutInfo &layout_info) const |
void | AddRecordMethods (lldb_private::SymbolFile &symbol_file, lldb_private::CompilerType &record_type, PDBFuncSymbolEnumerator &methods_enum) |
clang::CXXMethodDecl * | AddRecordMethod (lldb_private::SymbolFile &symbol_file, lldb_private::CompilerType &record_type, const llvm::pdb::PDBSymbolFunc &method) const |
Definition at line 43 of file PDBASTParser.h.
|
private |
Definition at line 69 of file PDBASTParser.h.
|
private |
Definition at line 75 of file PDBASTParser.h.
|
private |
Definition at line 71 of file PDBASTParser.h.
|
private |
Definition at line 73 of file PDBASTParser.h.
|
private |
Definition at line 79 of file PDBASTParser.h.
|
private |
Definition at line 77 of file PDBASTParser.h.
|
private |
Definition at line 81 of file PDBASTParser.h.
|
private |
Definition at line 70 of file PDBASTParser.h.
PDBASTParser::PDBASTParser | ( | lldb_private::TypeSystemClang & | ast | ) |
Definition at line 365 of file PDBASTParser.cpp.
|
default |
|
private |
Definition at line 1152 of file PDBASTParser.cpp.
References lldb_private::TypeSystemClang::AddEnumerationValueToEnumerationType(), MSVCUndecoratedNameParser::DropScope(), lldb_private::TypeSystemClang::getASTContext(), lldb_private::TypeSystemClang::GetEnumerationIntegerType(), lldb_private::ClangUtil::GetQualType(), m_ast, and m_uid_to_decl.
Referenced by CreateLLDBTypeFromPDBType().
|
private |
Definition at line 1362 of file PDBASTParser.cpp.
References lldb_private::ClangASTImporter::LayoutInfo::base_offsets, lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), lldb_private::TypeSystemClang::CreateBaseClassSpecifier(), lldb_private::TypeSystemClang::GetAsCXXRecordDecl(), lldb_private::ConstString::GetCString(), lldb_private::Type::GetFullCompilerType(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFile::GetObjectFile(), lldb_private::CompilerType::GetOpaqueQualType(), lldb_private::CompilerType::GetTypeName(), lldbassert, m_ast, lldb_private::SymbolFile::ResolveTypeUID(), lldb_private::TypeSystemClang::StartTagDeclarationDefinition(), lldb_private::TypeSystemClang::TransferBaseClasses(), and TranslateMemberAccess().
Referenced by CompleteTypeFromUDT().
|
private |
Definition at line 1240 of file PDBASTParser.cpp.
References lldb_private::TypeSystemClang::AddFieldToRecordType(), lldb_private::TypeSystemClang::AddVariableToRecordType(), lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), lldb::eBasicTypeDouble, lldb::eBasicTypeFloat, lldb::eBasicTypeLongDouble, lldb_private::ClangASTImporter::LayoutInfo::field_offsets, lldb_private::TypeSystemClang::getASTContext(), lldb_private::ConstString::GetCString(), lldb_private::Type::GetLayoutCompilerType(), lldb_private::GetLog(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFile::GetObjectFile(), lldb_private::CompilerType::GetTypeName(), LLDB_LOG, m_ast, m_uid_to_decl, lldb_private::SymbolFile::ResolveTypeUID(), lldb_private::TypeSystemClang::SetFloatingInitializerForVariable(), lldb_private::TypeSystemClang::SetIntegerInitializerForVariable(), lldb_private::TypeSystemClang::StartTagDeclarationDefinition(), and TranslateMemberAccess().
Referenced by CompleteTypeFromUDT().
|
private |
Definition at line 1422 of file PDBASTParser.cpp.
References lldb_private::TypeSystemClang::AddMethodToCXXRecordType(), lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), MSVCUndecoratedNameParser::DropScope(), lldb::eAccessNone, lldb::eAccessPublic, lldb_private::CompilerType::GetCompleteType(), lldb_private::ConstString::GetCString(), lldb_private::Type::GetFullCompilerType(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFile::GetObjectFile(), lldb_private::CompilerType::GetOpaqueQualType(), lldb_private::CompilerType::GetTypeName(), m_ast, lldb_private::SymbolFile::ResolveTypeUID(), lldb_private::TypeSystemClang::StartTagDeclarationDefinition(), and TranslateMemberAccess().
Referenced by AddRecordMethods(), and GetDeclForSymbol().
|
private |
Definition at line 1412 of file PDBASTParser.cpp.
References AddRecordMethod(), and m_uid_to_decl.
Referenced by CompleteTypeFromUDT().
bool PDBASTParser::CompleteTypeFromPDB | ( | lldb_private::CompilerType & | compiler_type | ) |
Definition at line 793 of file PDBASTParser.cpp.
References lldb_private::ClangASTImporter::CompleteType(), CompleteTypeFromUDT(), lldb_private::TypeSystemClang::GetAsCXXRecordDecl(), lldb_private::SymbolFile::GetBackingSymbolFile(), GetClangASTImporter(), lldb_private::CompilerType::GetOpaqueQualType(), SymbolFilePDB::GetPDBSession(), lldb_private::TypeSystem::GetSymbolFile(), m_ast, m_forward_decl_to_uid, and lldb_private::TypeSystemClang::SetHasExternalStorage().
Referenced by SymbolFilePDB::CompleteType().
|
private |
Definition at line 1200 of file PDBASTParser.cpp.
References lldb_private::TypeSystemClang::AddMethodOverridesForCXXRecordType(), AddRecordBases(), AddRecordMembers(), AddRecordMethods(), lldb_private::ClangASTImporter::LayoutInfo::bit_size, lldb_private::TypeSystemClang::BuildIndirectFields(), lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), lldb_private::TypeSystemClang::GetAsCXXRecordDecl(), GetClangASTImporter(), lldb_private::CompilerType::GetOpaqueQualType(), m_ast, lldb_private::SymbolFile::ResolveTypeUID(), lldb_private::ClangASTImporter::SetRecordLayout(), and TranslateUdtKind().
Referenced by CompleteTypeFromPDB().
lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType | ( | const llvm::pdb::PDBSymbol & | type | ) |
Definition at line 371 of file PDBASTParser.cpp.
References lldb_private::CompilerType::AddConstModifier(), AddEnumValue(), lldb_private::CompilerType::AddRestrictModifier(), AddSourceInfoToDecl(), lldb_private::CompilerType::AddVolatileModifier(), lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), lldb_private::TypeSystemClang::CreateArrayType(), lldb_private::TypeSystemClang::CreateDeclContext(), lldb_private::TypeSystemClang::CreateEnumerationType(), lldb_private::TypeSystemClang::CreateFunctionType(), lldb_private::TypeSystemClang::CreateMemberPointerType(), lldb_private::TypeSystemClang::CreateRecordType(), lldb_private::CompilerType::CreateTypedef(), MSVCUndecoratedNameParser::DropScope(), lldb::eBasicTypeInt, lldb_private::Type::eEncodingIsTypedefUID, lldb_private::Type::eEncodingIsUID, lldb::eLanguageTypeC_plus_plus, lldb_private::Type::Forward, lldb_private::Type::Full, GetAccessibilityForUdt(), lldb_private::TypeSystemClang::GetAsCXXRecordDecl(), lldb_private::TypeSystemClang::GetAsEnumDecl(), lldb_private::TypeSystemClang::getASTContext(), lldb_private::TypeSystemClang::GetAsTypedefDecl(), lldb_private::TypeSystemClang::GetBasicType(), GetBuiltinTypeForPDBEncodingAndBitSize(), lldb_private::CompilerType::GetCompleteType(), GetDeclContextContainingSymbol(), lldb_private::Type::GetForwardCompilerType(), lldb_private::Type::GetFullCompilerType(), lldb_private::UserID::GetID(), lldb_private::CompilerType::GetLValueReferenceType(), GetMSInheritance(), lldb_private::CompilerType::GetOpaqueQualType(), GetPDBBuiltinTypeName(), lldb_private::CompilerType::GetPointerType(), lldb_private::CompilerType::GetRValueReferenceType(), lldb_private::TypeSystem::GetSymbolFile(), lldb_private::TypeSystemClang::GetTypeForIdentifier(), lldb_private::TypeSystemClang::IsCXXClassType(), lldb_private::CompilerType::IsValid(), LLDB_INVALID_UID, lldbassert, m_ast, m_forward_decl_to_uid, m_uid_to_decl, lldb_private::SymbolFile::MakeType(), lldb_private::SymbolFile::ResolveTypeUID(), lldb_private::TypeSystemClang::SetHasExternalStorage(), lldb_private::ClangASTMetadata::SetIsDynamicCXXType(), lldb_private::ClangASTMetadata::SetUserID(), lldb_private::TypeSystemClang::StartTagDeclarationDefinition(), TranslateBuiltinEncoding(), TranslateCallingConvention(), TranslateEnumEncoding(), and TranslateUdtKind().
Referenced by SymbolFilePDB::ResolveTypeUID().
clang::NamespaceDecl * PDBASTParser::FindNamespaceDecl | ( | const clang::DeclContext * | parent, |
llvm::StringRef | name | ||
) |
Definition at line 1127 of file PDBASTParser.cpp.
References FindNamespaceDecl(), m_namespaces, and m_parent_to_namespaces.
Referenced by SymbolFilePDB::FindNamespace(), and FindNamespaceDecl().
|
inline |
Definition at line 63 of file PDBASTParser.h.
References m_ast_importer.
Referenced by CompleteTypeFromPDB(), and CompleteTypeFromUDT().
clang::DeclContext * PDBASTParser::GetDeclContextContainingSymbol | ( | const llvm::pdb::PDBSymbol & | symbol | ) |
Definition at line 1026 of file PDBASTParser.cpp.
References lldb_private::SymbolFile::GetBackingSymbolFile(), GetClassOrFunctionParent(), GetDeclContextForSymbol(), MSVCUndecoratedNameParser::GetSpecifiers(), lldb_private::TypeSystem::GetSymbolFile(), lldb_private::TypeSystemClang::GetTranslationUnitDecl(), lldb_private::TypeSystemClang::GetUniqueNamespaceDeclaration(), IsAnonymousNamespaceName(), m_ast, m_namespaces, and m_parent_to_namespaces.
Referenced by CreateLLDBTypeFromPDBType(), SymbolFilePDB::GetDeclContextContainingUID(), and GetDeclForSymbol().
clang::DeclContext * PDBASTParser::GetDeclContextForSymbol | ( | const llvm::pdb::PDBSymbol & | symbol | ) |
Definition at line 997 of file PDBASTParser.cpp.
References lldb_private::SymbolFile::GetBackingSymbolFile(), lldb_private::TypeSystemClang::GetDeclContextForType(), GetDeclForSymbol(), lldb_private::TypeSystem::GetSymbolFile(), m_ast, m_decl_context_to_uid, and SymbolFilePDB::ResolveTypeUID().
Referenced by GetDeclContextContainingSymbol(), and SymbolFilePDB::GetDeclContextForUID().
clang::Decl * PDBASTParser::GetDeclForSymbol | ( | const llvm::pdb::PDBSymbol & | symbol | ) |
Definition at line 835 of file PDBASTParser.cpp.
References AddRecordMethod(), lldb_private::TypeSystemClang::CreateFunctionDeclaration(), lldb_private::TypeSystemClang::CreateParameterDeclaration(), lldb_private::TypeSystemClang::CreateVariableDeclaration(), MSVCUndecoratedNameParser::DropScope(), lldb_private::TypeSystemClang::getASTContext(), lldb_private::SymbolFile::GetBackingSymbolFile(), lldb_private::TypeSystemClang::GetCompleteDecl(), GetDeclContextContainingSymbol(), GetDeclFromContextByName(), lldb_private::Type::GetForwardCompilerType(), lldb_private::ClangUtil::GetQualType(), lldb_private::TypeSystem::GetSymbolFile(), m_ast, m_uid_to_decl, SymbolFilePDB::ResolveTypeUID(), and lldb_private::TypeSystemClang::SetFunctionParameters().
Referenced by GetDeclContextForSymbol(), SymbolFilePDB::GetDeclForUID(), SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc(), ParseDeclsForDeclContext(), and SymbolFilePDB::ParseVariables().
void PDBASTParser::ParseDeclsForDeclContext | ( | const clang::DeclContext * | decl_context | ) |
Definition at line 1101 of file PDBASTParser.cpp.
References lldb_private::SymbolFile::GetBackingSymbolFile(), GetDeclForSymbol(), SymbolFilePDB::GetPDBSession(), lldb_private::TypeSystem::GetSymbolFile(), m_ast, and m_decl_context_to_uid.
Referenced by SymbolFilePDB::ParseDeclsForContext().
|
private |
Definition at line 106 of file PDBASTParser.h.
Referenced by AddEnumValue(), AddRecordBases(), AddRecordMembers(), AddRecordMethod(), CompleteTypeFromPDB(), CompleteTypeFromUDT(), CreateLLDBTypeFromPDBType(), GetDeclContextContainingSymbol(), GetDeclContextForSymbol(), GetDeclForSymbol(), and ParseDeclsForDeclContext().
|
private |
Definition at line 107 of file PDBASTParser.h.
Referenced by GetClangASTImporter().
|
private |
Definition at line 113 of file PDBASTParser.h.
Referenced by GetDeclContextForSymbol(), and ParseDeclsForDeclContext().
|
private |
Definition at line 109 of file PDBASTParser.h.
Referenced by CompleteTypeFromPDB(), and CreateLLDBTypeFromPDBType().
|
private |
Definition at line 112 of file PDBASTParser.h.
Referenced by FindNamespaceDecl(), and GetDeclContextContainingSymbol().
|
private |
Definition at line 111 of file PDBASTParser.h.
Referenced by FindNamespaceDecl(), and GetDeclContextContainingSymbol().
|
private |
Definition at line 110 of file PDBASTParser.h.
Referenced by AddEnumValue(), AddRecordMembers(), AddRecordMethods(), CreateLLDBTypeFromPDBType(), and GetDeclForSymbol().