9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_PDBASTBUILDERCLANG_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_PDBASTBUILDERCLANG_H
16#include "llvm/ADT/DenseMap.h"
17#include "llvm/DebugInfo/CodeView/CVRecord.h"
18#include "llvm/Support/Threading.h"
38enum class CallingConvention : uint8_t;
75 llvm::StringRef name)
override;
77 void Dump(
Stream &stream, llvm::StringRef filter,
bool show_color)
override;
103 clang::FunctionDecl *
116 clang::QualType
CreateArrayType(
const llvm::codeview::ArrayRecord &array);
118 const llvm::codeview::TagRecord &record);
120 const llvm::codeview::EnumRecord &record);
123 llvm::codeview::CallingConvention calling_convention);
127 clang::FunctionDecl &function_decl,
128 uint32_t param_count);
131 llvm::codeview::CVSymbol sym,
132 clang::DeclContext &scope);
134 clang::DeclContext &context);
137 clang::FunctionDecl *
140 uint32_t param_count, clang::StorageClass func_storage,
141 bool is_inline, clang::DeclContext *parent);
148 std::pair<clang::DeclContext *, std::string>
150 std::pair<clang::DeclContext *, std::string>
166 llvm::SmallSet<std::pair<llvm::StringRef, CompilerType>, 8>>
Manages and observes all Clang AST node importing in LLDB.
Represents a generic declaration context in a program.
Represents a generic declaration such as a function declaration.
Generic representation of a type in a programming language.
A stream class that can stream formatted output to a file.
A TypeSystem implementation based on Clang.
clang::Decl * GetOrCreateSymbolForId(PdbCompilandSymId id)
std::pair< clang::DeclContext *, std::string > CreateDeclInfoForType(const llvm::codeview::TagRecord &record, TypeIndex ti)
void ParseDeclsForSimpleContext(clang::DeclContext &context)
CompilerDeclContext ToCompilerDeclContext(clang::DeclContext *context)
clang::FunctionDecl * GetOrCreateInlinedFunctionDecl(PdbCompilandSymId inlinesite_id)
llvm::DenseMap< clang::DeclContext *, NamespaceSet > m_parent_to_namespaces
void CreateFunctionParameters(PdbCompilandSymId func_id, clang::FunctionDecl &function_decl, uint32_t param_count)
bool CompleteType(CompilerType ct) override
clang::QualType GetBasicType(lldb::BasicType type)
clang::Decl * TryGetDecl(PdbSymUid uid) const
clang::QualType CreateType(PdbTypeSymId type)
clang::QualType CreateFunctionType(TypeIndex args_type_idx, TypeIndex return_type_idx, llvm::codeview::CallingConvention calling_convention)
clang::QualType CreateArrayType(const llvm::codeview::ArrayRecord &array)
llvm::DenseMap< clang::Decl *, DeclStatus > m_decl_to_status
llvm::DenseMap< lldb::opaque_compiler_type_t, llvm::SmallSet< std::pair< llvm::StringRef, CompilerType >, 8 > > m_cxx_record_map
clang::FunctionDecl * CreateFunctionDeclFromId(PdbTypeSymId func_tid, PdbCompilandSymId func_sid)
CompilerType GetOrCreateType(PdbTypeSymId type) override
clang::QualType CreatePointerType(const llvm::codeview::PointerRecord &pointer)
llvm::once_flag m_parse_functions_and_non_local_vars
NamespaceSet m_parsed_namespaces
clang::QualType CreateModifierType(const llvm::codeview::ModifierRecord &modifier)
ClangASTImporter m_importer
CompilerDeclContext GetTranslationUnitDecl()
std::pair< clang::DeclContext *, std::string > CreateDeclInfoForUndecoratedName(llvm::StringRef uname)
clang::FunctionDecl * GetOrCreateFunctionDecl(PdbCompilandSymId func_id)
clang::NamespaceDecl * GetOrCreateNamespaceDecl(const char *name, clang::DeclContext &context)
TypeSystemClang & clang()
TypeSystemClang & m_clang
llvm::once_flag m_parse_all_types
void EnsureVariable(PdbCompilandSymId scope_id, PdbCompilandSymId var_id) override
clang::VarDecl * CreateVariableDecl(PdbSymUid uid, llvm::codeview::CVSymbol sym, clang::DeclContext &scope)
void ParseAllFunctionsAndNonLocalVars()
void ParseDeclsForContext(CompilerDeclContext context) override
CompilerDecl ToCompilerDecl(clang::Decl *decl)
void EnsureFunction(PdbCompilandSymId func_id) override
llvm::DenseMap< lldb::user_id_t, clang::QualType > m_uid_to_type
void EnsureBlock(PdbCompilandSymId block_id) override
ClangASTImporter & GetClangASTImporter()
llvm::DenseMap< lldb::user_id_t, clang::Decl * > m_uid_to_decl
CompilerDecl GetOrCreateDeclForUid(PdbSymUid uid) override
CompilerDeclContext FindNamespaceDecl(CompilerDeclContext parent_ctx, llvm::StringRef name) override
void ParseNamespace(clang::DeclContext &parent)
llvm::DenseSet< clang::NamespaceDecl * > NamespaceSet
clang::VarDecl * GetOrCreateVariableDecl(PdbCompilandSymId scope_id, PdbCompilandSymId var_id)
clang::BlockDecl * GetOrCreateBlockDecl(PdbCompilandSymId block_id)
clang::QualType CreateSimpleType(TypeIndex ti)
clang::DeclContext * GetParentClangDeclContext(PdbSymUid uid)
clang::QualType FromCompilerType(CompilerType ct)
clang::QualType CreateEnumType(PdbTypeSymId id, const llvm::codeview::EnumRecord &record)
CompilerType GetOrCreateTypedefType(PdbGlobalSymId id) override
bool CompleteTagDecl(clang::TagDecl &tag)
clang::QualType CreateRecordType(PdbTypeSymId id, const llvm::codeview::TagRecord &record)
CompilerDeclContext GetParentDeclContext(PdbSymUid uid) override
clang::DeclContext * FromCompilerDeclContext(CompilerDeclContext context)
llvm::codeview::TypeIndex TypeIndex
clang::FunctionDecl * CreateFunctionDecl(PdbCompilandSymId func_id, llvm::StringRef func_name, TypeIndex func_ti, CompilerType func_ct, uint32_t param_count, clang::StorageClass func_storage, bool is_inline, clang::DeclContext *parent)
CompilerDeclContext GetOrCreateDeclContextForUid(PdbSymUid uid) override
void EnsureInlinedFunction(PdbCompilandSymId inlinesite_id) override
CompilerType ToCompilerType(clang::QualType qt)
clang::QualType GetOrCreateClangType(PdbTypeSymId type)
void ParseBlockChildren(PdbCompilandSymId block_id)
void Dump(Stream &stream, llvm::StringRef filter, bool show_color) override
clang::Decl * FromCompilerDecl(CompilerDecl decl)
PdbAstBuilderClang(TypeSystemClang &clang)
NamespaceSet m_known_namespaces
clang::DeclContext * GetOrCreateClangDeclContextForUid(PdbSymUid uid)
A class that represents a running process on the host machine.
void * opaque_compiler_type_t
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
DeclStatus(lldb::user_id_t uid, bool resolved)