9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
12#include "clang/AST/CharUnits.h"
13#include "clang/AST/Type.h"
14#include "llvm/ADT/DenseMap.h"
15#include "llvm/ADT/SmallPtrSet.h"
16#include "llvm/ADT/SmallVector.h"
48 bool *type_is_new_ptr)
override;
88 llvm::Expected<llvm::APInt>
111 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::DeclContext *>
113 typedef std::multimap<const clang::DeclContext *, const DWARFDIE>
118 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::Decl *>
148 &template_param_infos);
153 &template_param_infos);
159 std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> &base_classes,
160 std::vector<DWARFDIE> &member_function_dies,
167 const DWARFDIE &parent_die,
bool skip_artificial,
168 bool &is_static,
bool &is_variadic,
169 bool &has_template_params,
170 std::vector<lldb_private::CompilerType> &function_args,
171 std::vector<clang::ParmVarDecl *> &function_param_decls,
172 unsigned &type_quals);
175 bool is_signed,
uint32_t enumerator_byte_size,
196 std::vector<DWARFDIE> &failures);
210 const DWARFDIE &die, lldb::TypeSP type_sp);
255 FieldInfo
const &last_field_info, uint64_t last_field_end,
256 FieldInfo
const &this_field_info,
280 FieldInfo &last_field_info);
317 const lldb::ModuleSP &module_sp,
318 std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> &base_classes,
bool CompleteRecordType(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &clang_type)
bool CompleteEnumType(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &clang_type)
lldb::TypeSP ParsePointerToMemberType(const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs)
std::multimap< const clang::DeclContext *, const DWARFDIE > DeclContextToDIEMap
bool ParseTemplateDIE(const DWARFDIE &die, lldb_private::TypeSystemClang::TemplateParameterInfos &template_param_infos)
llvm::Expected< llvm::APInt > ExtractIntFromFormValue(const lldb_private::CompilerType &int_type, const DWARFFormValue &form_value) const
Extracts an value for a given Clang integer type from a DWARFFormValue.
std::unique_ptr< lldb_private::ClangASTImporter > m_clang_ast_importer_up
lldb::TypeSP ParseSubroutine(const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
size_t ParseChildParameters(clang::DeclContext *containing_decl_ctx, const DWARFDIE &parent_die, bool skip_artificial, bool &is_static, bool &is_variadic, bool &has_template_params, std::vector< lldb_private::CompilerType > &function_args, std::vector< clang::ParmVarDecl * > &function_param_decls, unsigned &type_quals)
lldb_private::TypeSystemClang & m_ast
bool ShouldCreateUnnamedBitfield(FieldInfo const &last_field_info, uint64_t last_field_end, FieldInfo const &this_field_info, lldb_private::ClangASTImporter::LayoutInfo const &layout_info) const
Returns 'true' if we should create an unnamed bitfield and add it to the parser's current AST.
lldb_private::Function * ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit, const DWARFDIE &die, const lldb_private::AddressRange &func_range) override
void LinkDeclToDIE(clang::Decl *decl, const DWARFDIE &die)
lldb_private::ClangASTImporter & GetClangASTImporter()
clang::NamespaceDecl * ResolveNamespaceDIE(const DWARFDIE &die)
lldb_private::CompilerDeclContext GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override
void ParseObjCProperty(const DWARFDIE &die, const DWARFDIE &parent_die, const lldb_private::CompilerType &class_clang_type, DelayedPropertyList &delayed_properties)
Parses a DW_TAG_APPLE_property DIE and appends the parsed data to the list of delayed Objective-C pro...
lldb_private::CompilerDeclContext GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) override
DIEToDeclContextMap m_die_to_decl_ctx
lldb_private::Type * GetTypeForDIE(const DWARFDIE &die)
std::string GetCPlusPlusQualifiedName(const DWARFDIE &die)
void EnsureAllDIEsInDeclContextHaveBeenParsed(lldb_private::CompilerDeclContext decl_context) override
lldb::TypeSP ParseArrayType(const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs)
size_t ParseChildEnumerators(lldb_private::CompilerType &compiler_type, bool is_signed, uint32_t enumerator_byte_size, const DWARFDIE &parent_die)
clang::DeclContext * GetCachedClangDeclContextForDIE(const DWARFDIE &die)
clang::NamespaceDecl * ResolveImportedDeclarationDIE(const DWARFDIE &die)
Returns the namespace decl that a DW_TAG_imported_declaration imports.
DIEToDeclMap m_die_to_decl
bool CopyUniqueClassMethodTypes(const DWARFDIE &src_class_die, const DWARFDIE &dst_class_die, lldb_private::Type *class_type, std::vector< DWARFDIE > &failures)
lldb::TypeSP UpdateSymbolContextScopeForType(const lldb_private::SymbolContext &sc, const DWARFDIE &die, lldb::TypeSP type_sp)
If type_sp is valid, calculate and set its symbol context scope, and update the type list for its bac...
lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc, const DWARFDIE &die, bool *type_is_new_ptr) override
clang::DeclContext * GetClangDeclContextContainingDIE(const DWARFDIE &die, DWARFDIE *decl_ctx_die)
lldb::TypeSP ParseTypeModifier(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
~DWARFASTParserClang() override
bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &compiler_type) override
std::vector< DelayedAddObjCClassProperty > DelayedPropertyList
lldb::ModuleSP GetModuleForType(const DWARFDIE &die)
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb_private::OptionalClangModuleID > DIEToModuleMap
clang::BlockDecl * ResolveBlockDIE(const DWARFDIE &die)
lldb::TypeSP ParseStructureLikeDIE(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
Parse a structure, class, or union type DIE.
lldb::TypeSP ParseEnum(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
clang::DeclContext * GetDeclContextForBlock(const DWARFDIE &die)
lldb::TypeSP ParseTypeFromClangModule(const lldb_private::SymbolContext &sc, const DWARFDIE &die, lldb_private::Log *log)
Follow Clang Module Skeleton CU references to find a type definition.
bool ParseChildMembers(const DWARFDIE &die, lldb_private::CompilerType &class_compiler_type, std::vector< std::unique_ptr< clang::CXXBaseSpecifier > > &base_classes, std::vector< DWARFDIE > &member_function_dies, DelayedPropertyList &delayed_properties, const lldb::AccessType default_accessibility, lldb_private::ClangASTImporter::LayoutInfo &layout_info)
llvm::DenseMap< const DWARFDebugInfoEntry *, clang::DeclContext * > DIEToDeclContextMap
DIEToModuleMap m_die_to_module
DeclContextToDIEMap m_decl_ctx_to_die
llvm::DenseMap< const DWARFDebugInfoEntry *, clang::Decl * > DIEToDeclMap
void ParseInheritance(const DWARFDIE &die, const DWARFDIE &parent_die, const lldb_private::CompilerType class_clang_type, const lldb::AccessType default_accessibility, const lldb::ModuleSP &module_sp, std::vector< std::unique_ptr< clang::CXXBaseSpecifier > > &base_classes, lldb_private::ClangASTImporter::LayoutInfo &layout_info)
Parses a DW_TAG_inheritance DIE into a base/super class.
lldb_private::OptionalClangModuleID GetOwningClangModule(const DWARFDIE &die)
lldb_private::ConstString GetDIEClassTemplateParams(const DWARFDIE &die) override
Returns the template parameters of a class DWARFDIE as a string.
void LinkDeclContextToDIE(clang::DeclContext *decl_ctx, const DWARFDIE &die)
void ParseSingleMember(const DWARFDIE &die, const DWARFDIE &parent_die, const lldb_private::CompilerType &class_clang_type, lldb::AccessType default_accessibility, lldb_private::ClangASTImporter::LayoutInfo &layout_info, FieldInfo &last_field_info)
lldb_private::ConstString ConstructDemangledNameFromDWARF(const DWARFDIE &die) override
bool ParseTemplateParameterInfos(const DWARFDIE &parent_die, lldb_private::TypeSystemClang::TemplateParameterInfos &template_param_infos)
clang::DeclContext * GetClangDeclContextForDIE(const DWARFDIE &die)
clang::Decl * GetClangDeclForDIE(const DWARFDIE &die)
lldb_private::CompilerDecl GetDeclForUIDFromDWARF(const DWARFDIE &die) override
DWARFDebugInfoEntry objects assume that they are living in one big vector and do pointer arithmetic o...
A section + offset based address range class.
Manages and observes all Clang AST node importing in LLDB.
A class that describes a compilation unit.
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 uniqued constant string class.
A class that describes the declaration location of a lldb object.
A class that describes a function.
Defines a symbol context baton that can be handed other debug core functions.
A TypeSystem implementation based on Clang.
A class that represents a running process on the host machine.
LanguageType
Programming language type.
@ eLanguageTypeUnknown
Unknown or invalid language value.
void SetIsArtificial(bool flag)
bool IsArtificial() const
bool NextBitfieldOffsetIsValid(const uint64_t next_bit_offset) const
void SetIsBitfield(bool flag)
Parsed form of all attributes that are relevant for type reconstruction.
lldb_private::Declaration decl
const char * mangled_name
lldb_private::ConstString name
lldb::AccessType accessibility
bool is_complete_objc_class
lldb::LanguageType class_language
bool is_forward_declaration
std::optional< uint64_t > byte_size
clang::StorageClass storage
DWARFFormValue specification
clang::RefQualifierKind ref_qual
Indicates ref-qualifier of C++ member function if present.
DWARFFormValue containing_type
DWARFFormValue abstract_origin
size_t calling_convention