LLDB mainline
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PDBASTParser Class Reference

#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::ClangASTImporterGetClangASTImporter ()
 

Private Types

typedef llvm::DenseMap< clang::CXXRecordDecl *, lldb::user_id_tCXXRecordDeclToUidMap
 
typedef llvm::DenseMap< lldb::user_id_t, clang::Decl * > UidToDeclMap
 
typedef std::set< clang::NamespaceDecl * > NamespacesSet
 
typedef llvm::DenseMap< clang::DeclContext *, NamespacesSetParentToNamespacesMap
 
typedef llvm::DenseMap< clang::DeclContext *, lldb::user_id_tDeclContextToUidMap
 
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
 

Private Attributes

lldb_private::TypeSystemClangm_ast
 
lldb_private::ClangASTImporter m_ast_importer
 
CXXRecordDeclToUidMap m_forward_decl_to_uid
 
UidToDeclMap m_uid_to_decl
 
ParentToNamespacesMap m_parent_to_namespaces
 
NamespacesSet m_namespaces
 
DeclContextToUidMap m_decl_context_to_uid
 

Detailed Description

Definition at line 43 of file PDBASTParser.h.

Member Typedef Documentation

◆ CXXRecordDeclToUidMap

typedef llvm::DenseMap<clang::CXXRecordDecl *, lldb::user_id_t> PDBASTParser::CXXRecordDeclToUidMap
private

Definition at line 69 of file PDBASTParser.h.

◆ DeclContextToUidMap

typedef llvm::DenseMap<clang::DeclContext *, lldb::user_id_t> PDBASTParser::DeclContextToUidMap
private

Definition at line 75 of file PDBASTParser.h.

◆ NamespacesSet

typedef std::set<clang::NamespaceDecl *> PDBASTParser::NamespacesSet
private

Definition at line 71 of file PDBASTParser.h.

◆ ParentToNamespacesMap

typedef llvm::DenseMap<clang::DeclContext *, NamespacesSet> PDBASTParser::ParentToNamespacesMap
private

Definition at line 73 of file PDBASTParser.h.

◆ PDBBaseClassSymbolEnumerator

typedef llvm::pdb::ConcreteSymbolEnumerator<llvm::pdb::PDBSymbolTypeBaseClass> PDBASTParser::PDBBaseClassSymbolEnumerator
private

Definition at line 79 of file PDBASTParser.h.

◆ PDBDataSymbolEnumerator

Definition at line 77 of file PDBASTParser.h.

◆ PDBFuncSymbolEnumerator

Definition at line 81 of file PDBASTParser.h.

◆ UidToDeclMap

typedef llvm::DenseMap<lldb::user_id_t, clang::Decl *> PDBASTParser::UidToDeclMap
private

Definition at line 70 of file PDBASTParser.h.

Constructor & Destructor Documentation

◆ PDBASTParser()

PDBASTParser::PDBASTParser ( lldb_private::TypeSystemClang ast)

Definition at line 365 of file PDBASTParser.cpp.

◆ ~PDBASTParser()

PDBASTParser::~PDBASTParser ( )
default

Member Function Documentation

◆ AddEnumValue()

bool PDBASTParser::AddEnumValue ( lldb_private::CompilerType  enum_type,
const llvm::pdb::PDBSymbolData &  data 
)
private

◆ AddRecordBases()

void PDBASTParser::AddRecordBases ( lldb_private::SymbolFile symbol_file,
lldb_private::CompilerType record_type,
int  record_kind,
PDBBaseClassSymbolEnumerator bases_enum,
lldb_private::ClangASTImporter::LayoutInfo layout_info 
) const
private

◆ AddRecordMembers()

void PDBASTParser::AddRecordMembers ( lldb_private::SymbolFile symbol_file,
lldb_private::CompilerType record_type,
PDBDataSymbolEnumerator members_enum,
lldb_private::ClangASTImporter::LayoutInfo layout_info 
)
private

◆ AddRecordMethod()

clang::CXXMethodDecl * PDBASTParser::AddRecordMethod ( lldb_private::SymbolFile symbol_file,
lldb_private::CompilerType record_type,
const llvm::pdb::PDBSymbolFunc &  method 
) const
private

◆ AddRecordMethods()

void PDBASTParser::AddRecordMethods ( lldb_private::SymbolFile symbol_file,
lldb_private::CompilerType record_type,
PDBFuncSymbolEnumerator methods_enum 
)
private

Definition at line 1412 of file PDBASTParser.cpp.

References AddRecordMethod(), and m_uid_to_decl.

Referenced by CompleteTypeFromUDT().

◆ CompleteTypeFromPDB()

bool PDBASTParser::CompleteTypeFromPDB ( lldb_private::CompilerType compiler_type)

◆ CompleteTypeFromUDT()

bool PDBASTParser::CompleteTypeFromUDT ( lldb_private::SymbolFile symbol_file,
lldb_private::CompilerType compiler_type,
llvm::pdb::PDBSymbolTypeUDT &  udt 
)
private

◆ CreateLLDBTypeFromPDBType()

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().

◆ FindNamespaceDecl()

clang::NamespaceDecl * PDBASTParser::FindNamespaceDecl ( const clang::DeclContext *  parent,
llvm::StringRef  name 
)

◆ GetClangASTImporter()

lldb_private::ClangASTImporter & PDBASTParser::GetClangASTImporter ( )
inline

Definition at line 63 of file PDBASTParser.h.

References m_ast_importer.

Referenced by CompleteTypeFromPDB(), and CompleteTypeFromUDT().

◆ GetDeclContextContainingSymbol()

clang::DeclContext * PDBASTParser::GetDeclContextContainingSymbol ( const llvm::pdb::PDBSymbol &  symbol)

◆ GetDeclContextForSymbol()

clang::DeclContext * PDBASTParser::GetDeclContextForSymbol ( const llvm::pdb::PDBSymbol &  symbol)

◆ GetDeclForSymbol()

clang::Decl * PDBASTParser::GetDeclForSymbol ( const llvm::pdb::PDBSymbol &  symbol)

◆ ParseDeclsForDeclContext()

void PDBASTParser::ParseDeclsForDeclContext ( const clang::DeclContext *  decl_context)

Member Data Documentation

◆ m_ast

lldb_private::TypeSystemClang& PDBASTParser::m_ast
private

◆ m_ast_importer

lldb_private::ClangASTImporter PDBASTParser::m_ast_importer
private

Definition at line 107 of file PDBASTParser.h.

Referenced by GetClangASTImporter().

◆ m_decl_context_to_uid

DeclContextToUidMap PDBASTParser::m_decl_context_to_uid
private

Definition at line 113 of file PDBASTParser.h.

Referenced by GetDeclContextForSymbol(), and ParseDeclsForDeclContext().

◆ m_forward_decl_to_uid

CXXRecordDeclToUidMap PDBASTParser::m_forward_decl_to_uid
private

Definition at line 109 of file PDBASTParser.h.

Referenced by CompleteTypeFromPDB(), and CreateLLDBTypeFromPDBType().

◆ m_namespaces

NamespacesSet PDBASTParser::m_namespaces
private

Definition at line 112 of file PDBASTParser.h.

Referenced by FindNamespaceDecl(), and GetDeclContextContainingSymbol().

◆ m_parent_to_namespaces

ParentToNamespacesMap PDBASTParser::m_parent_to_namespaces
private

Definition at line 111 of file PDBASTParser.h.

Referenced by FindNamespaceDecl(), and GetDeclContextContainingSymbol().

◆ m_uid_to_decl

UidToDeclMap PDBASTParser::m_uid_to_decl
private

The documentation for this class was generated from the following files: