LLDB  mainline
DWARFASTParserClang.h
Go to the documentation of this file.
1 //===-- DWARFASTParserClang.h -----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
11 
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"
17 
18 #include "DWARFASTParser.h"
19 #include "DWARFDIE.h"
20 #include "DWARFDefines.h"
21 #include "DWARFFormValue.h"
22 #include "LogChannelDWARF.h"
24 
27 
28 #include <optional>
29 #include <vector>
30 
31 namespace lldb_private {
32 class CompileUnit;
33 }
35 class SymbolFileDWARF;
36 
38 
40 public:
42 
43  ~DWARFASTParserClang() override;
44 
45  // DWARFASTParser interface.
46  lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc,
47  const DWARFDIE &die,
48  bool *type_is_new_ptr) override;
49 
51  ConstructDemangledNameFromDWARF(const DWARFDIE &die) override;
52 
55  const DWARFDIE &die,
56  const lldb_private::AddressRange &func_range) override;
57 
58  bool
60  lldb_private::CompilerType &compiler_type) override;
61 
63  GetDeclForUIDFromDWARF(const DWARFDIE &die) override;
64 
66  lldb_private::CompilerDeclContext decl_context) override;
67 
69  GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override;
70 
73 
75 
76  /// Extracts an value for a given Clang integer type from a DWARFFormValue.
77  ///
78  /// \param int_type The Clang type that defines the bit size and signedness
79  /// of the integer that should be extracted. Has to be either
80  /// an integer type or an enum type. For enum types the
81  /// underlying integer type will be considered as the
82  /// expected integer type that should be extracted.
83  /// \param form_value The DWARFFormValue that contains the integer value.
84  /// \return An APInt containing the same integer value as the given
85  /// DWARFFormValue with the bit width of the given integer type.
86  /// Returns an error if the value in the DWARFFormValue does not fit
87  /// into the given integer type or the integer type isn't supported.
88  llvm::Expected<llvm::APInt>
90  const DWARFFormValue &form_value) const;
91 
92  /// Returns the template parameters of a class DWARFDIE as a string.
93  ///
94  /// This is mostly useful for -gsimple-template-names which omits template
95  /// parameters from the DIE name and instead always adds template parameter
96  /// children DIEs.
97  ///
98  /// \param die The struct/class DWARFDIE containing template parameters.
99  /// \return A string, including surrounding '<>', of the template parameters.
100  /// If the DIE's name already has '<>', returns an empty ConstString because
101  /// it's assumed that the caller is using the DIE name anyway.
103  GetDIEClassTemplateParams(const DWARFDIE &die) override;
104 
105 protected:
106  /// Protected typedefs and members.
107  /// @{
109  typedef std::vector<DelayedAddObjCClassProperty> DelayedPropertyList;
110 
111  typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::DeclContext *>
113  typedef std::multimap<const clang::DeclContext *, const DWARFDIE>
115  typedef llvm::DenseMap<const DWARFDebugInfoEntry *,
118  typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::Decl *>
120 
126  std::unique_ptr<lldb_private::ClangASTImporter> m_clang_ast_importer_up;
127  /// @}
128 
129  clang::DeclContext *GetDeclContextForBlock(const DWARFDIE &die);
130 
131  clang::BlockDecl *ResolveBlockDIE(const DWARFDIE &die);
132 
133  clang::NamespaceDecl *ResolveNamespaceDIE(const DWARFDIE &die);
134 
135  bool ParseTemplateDIE(const DWARFDIE &die,
137  &template_param_infos);
138 
140  const DWARFDIE &parent_die,
142  &template_param_infos);
143 
145 
146  bool ParseChildMembers(
147  const DWARFDIE &die, lldb_private::CompilerType &class_compiler_type,
148  std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> &base_classes,
149  std::vector<DWARFDIE> &member_function_dies,
150  DelayedPropertyList &delayed_properties,
151  const lldb::AccessType default_accessibility,
153 
154  size_t
155  ParseChildParameters(clang::DeclContext *containing_decl_ctx,
156  const DWARFDIE &parent_die, bool skip_artificial,
157  bool &is_static, bool &is_variadic,
158  bool &has_template_params,
159  std::vector<lldb_private::CompilerType> &function_args,
160  std::vector<clang::ParmVarDecl *> &function_param_decls,
161  unsigned &type_quals);
162 
164  bool is_signed, uint32_t enumerator_byte_size,
165  const DWARFDIE &parent_die);
166 
167  /// Parse a structure, class, or union type DIE.
168  lldb::TypeSP ParseStructureLikeDIE(const lldb_private::SymbolContext &sc,
169  const DWARFDIE &die,
171 
173 
174  clang::Decl *GetClangDeclForDIE(const DWARFDIE &die);
175 
176  clang::DeclContext *GetClangDeclContextForDIE(const DWARFDIE &die);
177 
178  clang::DeclContext *GetClangDeclContextContainingDIE(const DWARFDIE &die,
179  DWARFDIE *decl_ctx_die);
181 
182  bool CopyUniqueClassMethodTypes(const DWARFDIE &src_class_die,
183  const DWARFDIE &dst_class_die,
184  lldb_private::Type *class_type,
185  std::vector<DWARFDIE> &failures);
186 
187  clang::DeclContext *GetCachedClangDeclContextForDIE(const DWARFDIE &die);
188 
189  void LinkDeclContextToDIE(clang::DeclContext *decl_ctx, const DWARFDIE &die);
190 
191  void LinkDeclToDIE(clang::Decl *decl, const DWARFDIE &die);
192 
193  /// If \p type_sp is valid, calculate and set its symbol context scope, and
194  /// update the type list for its backing symbol file.
195  ///
196  /// Returns \p type_sp.
197  lldb::TypeSP
199  const DWARFDIE &die, lldb::TypeSP type_sp);
200 
201  /// Follow Clang Module Skeleton CU references to find a type definition.
203  const DWARFDIE &die,
204  lldb_private::Log *log);
205 
206  // Return true if this type is a declaration to a type in an external
207  // module.
208  lldb::ModuleSP GetModuleForType(const DWARFDIE &die);
209 
210 private:
211  struct FieldInfo {
212  uint64_t bit_size = 0;
213  uint64_t bit_offset = 0;
214  bool is_bitfield = false;
215 
216  FieldInfo() = default;
217 
218  void SetIsBitfield(bool flag) { is_bitfield = flag; }
219  bool IsBitfield() { return is_bitfield; }
220 
221  bool NextBitfieldOffsetIsValid(const uint64_t next_bit_offset) const {
222  // Any subsequent bitfields must not overlap and must be at a higher
223  // bit offset than any previous bitfield + size.
224  return (bit_size + bit_offset) <= next_bit_offset;
225  }
226  };
227 
228  /// Parses a DW_TAG_APPLE_property DIE and appends the parsed data to the
229  /// list of delayed Objective-C properties.
230  ///
231  /// Note: The delayed property needs to be finalized to actually create the
232  /// property declarations in the module AST.
233  ///
234  /// \param die The DW_TAG_APPLE_property DIE that will be parsed.
235  /// \param parent_die The parent DIE.
236  /// \param class_clang_type The Objective-C class that will contain the
237  /// created property.
238  /// \param delayed_properties The list of delayed properties that the result
239  /// will be appended to.
240  void ParseObjCProperty(const DWARFDIE &die, const DWARFDIE &parent_die,
241  const lldb_private::CompilerType &class_clang_type,
242  DelayedPropertyList &delayed_properties);
243 
244  void
245  ParseSingleMember(const DWARFDIE &die, const DWARFDIE &parent_die,
246  const lldb_private::CompilerType &class_clang_type,
247  lldb::AccessType default_accessibility,
249  FieldInfo &last_field_info);
250 
251  bool CompleteRecordType(const DWARFDIE &die, lldb_private::Type *type,
252  lldb_private::CompilerType &clang_type);
253  bool CompleteEnumType(const DWARFDIE &die, lldb_private::Type *type,
254  lldb_private::CompilerType &clang_type);
255 
256  lldb::TypeSP ParseTypeModifier(const lldb_private::SymbolContext &sc,
257  const DWARFDIE &die,
259  lldb::TypeSP ParseEnum(const lldb_private::SymbolContext &sc,
260  const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs);
261  lldb::TypeSP ParseSubroutine(const DWARFDIE &die,
263  lldb::TypeSP ParseArrayType(const DWARFDIE &die,
264  const ParsedDWARFTypeAttributes &attrs);
265  lldb::TypeSP ParsePointerToMemberType(const DWARFDIE &die,
266  const ParsedDWARFTypeAttributes &attrs);
267 
268  /// Parses a DW_TAG_inheritance DIE into a base/super class.
269  ///
270  /// \param die The DW_TAG_inheritance DIE to parse.
271  /// \param parent_die The parent DIE of the given DIE.
272  /// \param class_clang_type The C++/Objective-C class representing parent_die.
273  /// For an Objective-C class this method sets the super class on success. For
274  /// a C++ class this will *not* add the result as a base class.
275  /// \param default_accessibility The default accessibility that is given to
276  /// base classes if they don't have an explicit accessibility set.
277  /// \param module_sp The current Module.
278  /// \param base_classes The list of C++ base classes that will be appended
279  /// with the parsed base class on success.
280  /// \param layout_info The layout information that will be updated for C++
281  /// base classes with the base offset.
282  void ParseInheritance(
283  const DWARFDIE &die, const DWARFDIE &parent_die,
284  const lldb_private::CompilerType class_clang_type,
285  const lldb::AccessType default_accessibility,
286  const lldb::ModuleSP &module_sp,
287  std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> &base_classes,
289 };
290 
291 /// Parsed form of all attributes that are relevant for type reconstruction.
292 /// Some attributes are relevant for all kinds of types (declaration), while
293 /// others are only meaningful to a specific type (is_virtual)
295  explicit ParsedDWARFTypeAttributes(const DWARFDIE &die);
296 
298  bool is_artificial = false;
300  bool is_explicit = false;
302  bool is_inline = false;
303  bool is_scoped_enum = false;
304  bool is_vector = false;
305  bool is_virtual = false;
306  bool is_objc_direct_call = false;
307  bool exports_symbols = false;
308  clang::StorageClass storage = clang::SC_None;
309  const char *mangled_name = nullptr;
319  std::optional<uint64_t> byte_size;
320  size_t calling_convention = llvm::dwarf::DW_CC_normal;
324  clang::RefQualifierKind ref_qual =
325  clang::RQ_None; ///< Indicates ref-qualifier of
326  ///< C++ member function if present.
327  ///< Is RQ_None otherwise.
328 };
329 
330 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
ParsedDWARFTypeAttributes::is_vector
bool is_vector
Definition: DWARFASTParserClang.h:304
DWARFASTParserClang::DelayedAddObjCClassProperty
Definition: DWARFASTParserClang.cpp:1918
DWARFFormValue.h
DWARFASTParserClang::CopyUniqueClassMethodTypes
bool CopyUniqueClassMethodTypes(const DWARFDIE &src_class_die, const DWARFDIE &dst_class_die, lldb_private::Type *class_type, std::vector< DWARFDIE > &failures)
Definition: DWARFASTParserClang.cpp:3504
ParsedDWARFTypeAttributes::byte_size
std::optional< uint64_t > byte_size
Definition: DWARFASTParserClang.h:319
DWARFASTParserClang::GetTypeForDIE
lldb_private::Type * GetTypeForDIE(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3169
ParsedDWARFTypeAttributes::ref_qual
clang::RefQualifierKind ref_qual
Indicates ref-qualifier of C++ member function if present.
Definition: DWARFASTParserClang.h:324
ParsedDWARFTypeAttributes::name
lldb_private::ConstString name
Definition: DWARFASTParserClang.h:310
ParsedDWARFTypeAttributes
Parsed form of all attributes that are relevant for type reconstruction.
Definition: DWARFASTParserClang.h:294
DWARFDIE.h
DWARFASTParserClang::GetCachedClangDeclContextForDIE
clang::DeclContext * GetCachedClangDeclContextForDIE(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3487
ParsedDWARFTypeAttributes::type
DWARFFormValue type
Definition: DWARFASTParserClang.h:317
ParsedDWARFTypeAttributes::is_forward_declaration
bool is_forward_declaration
Definition: DWARFASTParserClang.h:301
DWARFASTParserClang::ParseChildMembers
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)
Definition: DWARFASTParserClang.cpp:2998
DWARFASTParserClang::DelayedPropertyList
std::vector< DelayedAddObjCClassProperty > DelayedPropertyList
Definition: DWARFASTParserClang.h:108
ParsedDWARFTypeAttributes::class_language
lldb::LanguageType class_language
Definition: DWARFASTParserClang.h:318
DWARFASTParserClang::ResolveNamespaceDIE
clang::NamespaceDecl * ResolveNamespaceDIE(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3441
DWARFASTParserClang::ParseArrayType
lldb::TypeSP ParseArrayType(const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs)
Definition: DWARFASTParserClang.cpp:1293
ParsedDWARFTypeAttributes::signature
DWARFFormValue signature
Definition: DWARFASTParserClang.h:315
DWARFASTParserClang::GetDeclForUIDFromDWARF
lldb_private::CompilerDecl GetDeclForUIDFromDWARF(const DWARFDIE &die) override
Definition: DWARFASTParserClang.cpp:2266
SymbolFileDWARF
Definition: SymbolFileDWARF.h:61
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:443
ParsedDWARFTypeAttributes::byte_stride
uint32_t byte_stride
Definition: DWARFASTParserClang.h:322
lldb_private::ClangASTImporter::LayoutInfo
Definition: ClangASTImporter.h:66
lldb_private::CompilerDecl
Represents a generic declaration such as a function declaration.
Definition: CompilerDecl.h:28
DWARFASTParserClang::ParseTemplateParameterInfos
bool ParseTemplateParameterInfos(const DWARFDIE &parent_die, lldb_private::TypeSystemClang::TemplateParameterInfos &template_param_infos)
Definition: DWARFASTParserClang.cpp:2090
DWARFASTParserClang::DIEToDeclMap
llvm::DenseMap< const DWARFDebugInfoEntry *, clang::Decl * > DIEToDeclMap
Definition: DWARFASTParserClang.h:119
DWARFASTParserClang::ParseStructureLikeDIE
lldb::TypeSP ParseStructureLikeDIE(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
Parse a structure, class, or union type DIE.
Definition: DWARFASTParserClang.cpp:1570
DWARFDebugInfoEntry
DWARFDebugInfoEntry objects assume that they are living in one big vector and do pointer arithmetic o...
Definition: DWARFDebugInfoEntry.h:32
lldb_private::SymbolContext
Definition: SymbolContext.h:33
DWARFASTParserClang::ParseFunctionFromDWARF
lldb_private::Function * ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit, const DWARFDIE &die, const lldb_private::AddressRange &func_range) override
Definition: DWARFASTParserClang.cpp:2390
DWARFDefines.h
DWARFASTParserClang::DIEToDeclContextMap
llvm::DenseMap< const DWARFDebugInfoEntry *, clang::DeclContext * > DIEToDeclContextMap
Definition: DWARFASTParserClang.h:112
lldb_private::CompileUnit
Definition: CompileUnit.h:38
DWARFDIE
Definition: DWARFDIE.h:16
DWARFASTParserClang::GetClangDeclForDIE
clang::Decl * GetClangDeclForDIE(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3190
DWARFASTParserClang::LinkDeclContextToDIE
void LinkDeclContextToDIE(clang::DeclContext *decl_ctx, const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3496
DWARFASTParserClang::ParseChildParameters
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)
Definition: DWARFASTParserClang.cpp:3047
DWARFASTParserClang::GetClangDeclContextContainingDIE
clang::DeclContext * GetClangDeclContextContainingDIE(const DWARFDIE &die, DWARFDIE *decl_ctx_die)
Definition: DWARFASTParserClang.cpp:3468
lldb_private::Function
Definition: Function.h:409
DWARFASTParserClang::ExtractIntFromFormValue
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.
Definition: DWARFASTParserClang.cpp:2674
DWARFASTParserClang::ConstructDemangledNameFromDWARF
lldb_private::ConstString ConstructDemangledNameFromDWARF(const DWARFDIE &die) override
Definition: DWARFASTParserClang.cpp:2357
DWARFASTParserClang::UpdateSymbolContextScopeForType
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...
Definition: DWARFASTParserClang.cpp:1485
DWARFASTParserClang::GetClangDeclContextForDIE
clang::DeclContext * GetClangDeclContextForDIE(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3288
ParsedDWARFTypeAttributes::storage
clang::StorageClass storage
Definition: DWARFASTParserClang.h:308
ParsedDWARFTypeAttributes::is_inline
bool is_inline
Definition: DWARFASTParserClang.h:302
TypeSystemClang.h
DWARFASTParserClang::LinkDeclToDIE
void LinkDeclToDIE(clang::Decl *decl, const DWARFDIE &die)
DWARFASTParserClang::FieldInfo::NextBitfieldOffsetIsValid
bool NextBitfieldOffsetIsValid(const uint64_t next_bit_offset) const
Definition: DWARFASTParserClang.h:221
DWARFASTParserClang::m_die_to_module
DIEToModuleMap m_die_to_module
Definition: DWARFASTParserClang.h:125
DWARFASTParserClang::GetDeclContextContainingUIDFromDWARF
lldb_private::CompilerDeclContext GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) override
Definition: DWARFASTParserClang.cpp:2282
DWARFASTParserClang::CompleteRecordType
bool CompleteRecordType(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &clang_type)
Definition: DWARFASTParserClang.cpp:2117
DWARFASTParserClang::ParseTypeFromDWARF
lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc, const DWARFDIE &die, bool *type_is_new_ptr) override
Definition: DWARFASTParserClang.cpp:409
ParsedDWARFTypeAttributes::accessibility
lldb::AccessType accessibility
Definition: DWARFASTParserClang.h:297
DWARFASTParserClang::FieldInfo::bit_offset
uint64_t bit_offset
Definition: DWARFASTParserClang.h:213
lldb::eAccessNone
@ eAccessNone
Definition: lldb-enumerations.h:515
DWARFASTParserClang::FieldInfo::SetIsBitfield
void SetIsBitfield(bool flag)
Definition: DWARFASTParserClang.h:218
DWARFASTParser.h
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::AddressRange
Definition: AddressRange.h:25
DWARFASTParserClang::DeclContextToDIEMap
std::multimap< const clang::DeclContext *, const DWARFDIE > DeclContextToDIEMap
Definition: DWARFASTParserClang.h:114
ParsedDWARFTypeAttributes::abstract_origin
DWARFFormValue abstract_origin
Definition: DWARFASTParserClang.h:313
DWARFFormValue
Definition: DWARFFormValue.h:20
PluginInterface.h
DWARFASTParserClang::ParseInheritance
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.
Definition: DWARFASTParserClang.cpp:1369
LogChannelDWARF.h
DWARFASTParserClang::m_die_to_decl_ctx
DIEToDeclContextMap m_die_to_decl_ctx
Definition: DWARFASTParserClang.h:123
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
ParsedDWARFTypeAttributes::is_explicit
bool is_explicit
Definition: DWARFASTParserClang.h:300
ParsedDWARFTypeAttributes::is_objc_direct_call
bool is_objc_direct_call
Definition: DWARFASTParserClang.h:306
DWARFASTParserClang::FieldInfo::FieldInfo
FieldInfo()=default
ParsedDWARFTypeAttributes::bit_stride
uint32_t bit_stride
Definition: DWARFASTParserClang.h:321
lldb_private::CompilerDeclContext
Represents a generic declaration context in a program.
Definition: CompilerDeclContext.h:30
DWARFASTParserClang::FieldInfo
Definition: DWARFASTParserClang.h:211
DWARFASTParserClang::FieldInfo::is_bitfield
bool is_bitfield
Definition: DWARFASTParserClang.h:214
DWARFASTParserClang::GetClangASTImporter
lldb_private::ClangASTImporter & GetClangASTImporter()
Definition: DWARFASTParserClang.cpp:80
DWARFASTParserClang::GetDIEClassTemplateParams
lldb_private::ConstString GetDIEClassTemplateParams(const DWARFDIE &die) override
Returns the template parameters of a class DWARFDIE as a string.
Definition: DWARFASTParserClang.cpp:744
ParsedDWARFTypeAttributes::calling_convention
size_t calling_convention
Definition: DWARFASTParserClang.h:320
DWARFASTParserClang::FieldInfo::IsBitfield
bool IsBitfield()
Definition: DWARFASTParserClang.h:219
ParsedDWARFTypeAttributes::encoding
uint32_t encoding
Definition: DWARFASTParserClang.h:323
DWARFASTParserClang::~DWARFASTParserClang
~DWARFASTParserClang() override
DWARFASTParserClang
Definition: DWARFASTParserClang.h:39
DWARFASTParserClang::GetModuleForType
lldb::ModuleSP GetModuleForType(const DWARFDIE &die)
ParsedDWARFTypeAttributes::is_complete_objc_class
bool is_complete_objc_class
Definition: DWARFASTParserClang.h:299
lldb_private::OptionalClangModuleID
A Clang module ID.
Definition: TypeSystemClang.h:57
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:444
uint32_t
DWARFASTParser
Definition: DWARFASTParser.h:27
DWARFASTParserClang::DIEToModuleMap
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb_private::OptionalClangModuleID > DIEToModuleMap
Definition: DWARFASTParserClang.h:117
DWARFASTParserClang::FieldInfo::bit_size
uint64_t bit_size
Definition: DWARFASTParserClang.h:212
DWARFASTParserClang::ParseTypeModifier
lldb::TypeSP ParseTypeModifier(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
Definition: DWARFASTParserClang.cpp:521
ParsedDWARFTypeAttributes::mangled_name
const char * mangled_name
Definition: DWARFASTParserClang.h:309
DWARFASTParserClang::GetDeclContextForUIDFromDWARF
lldb_private::CompilerDeclContext GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override
Definition: DWARFASTParserClang.cpp:2274
DWARFASTParserClang::m_die_to_decl
DIEToDeclMap m_die_to_decl
Definition: DWARFASTParserClang.h:122
DWARFASTParserClang::EnsureAllDIEsInDeclContextHaveBeenParsed
void EnsureAllDIEsInDeclContextHaveBeenParsed(lldb_private::CompilerDeclContext decl_context) override
Definition: DWARFASTParserClang.cpp:2255
lldb_private::Type
Definition: Type.h:68
DWARFASTParserClang::CompleteTypeFromDWARF
bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &compiler_type) override
Definition: DWARFASTParserClang.cpp:2221
DWARFASTParserClang::m_ast
lldb_private::TypeSystemClang & m_ast
Definition: DWARFASTParserClang.h:121
DWARFASTParserClang::ParseEnum
lldb::TypeSP ParseEnum(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
Definition: DWARFASTParserClang.cpp:755
DWARFASTParserClang::ParseObjCProperty
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...
Definition: DWARFASTParserClang.cpp:2638
lldb_private::ClangASTImporter
Manages and observes all Clang AST node importing in LLDB.
Definition: ClangASTImporter.h:64
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
ParsedDWARFTypeAttributes::specification
DWARFFormValue specification
Definition: DWARFASTParserClang.h:316
ParsedDWARFTypeAttributes::decl
lldb_private::Declaration decl
Definition: DWARFASTParserClang.h:311
DWARFASTParserClang::ResolveBlockDIE
clang::BlockDecl * ResolveBlockDIE(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3419
ParsedDWARFTypeAttributes::containing_type
DWARFFormValue containing_type
Definition: DWARFASTParserClang.h:314
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
DWARFASTParserClang::ParseSubroutine
lldb::TypeSP ParseSubroutine(const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
Definition: DWARFASTParserClang.cpp:891
DWARFASTParserClang::GetCPlusPlusQualifiedName
std::string GetCPlusPlusQualifiedName(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:1515
lldb_private::TypeSystemClang
A TypeSystem implementation based on Clang.
Definition: TypeSystemClang.h:106
DWARFASTParserClang::ParseTemplateDIE
bool ParseTemplateDIE(const DWARFDIE &die, lldb_private::TypeSystemClang::TemplateParameterInfos &template_param_infos)
Definition: DWARFASTParserClang.cpp:1975
ClangASTImporter.h
ParsedDWARFTypeAttributes::is_scoped_enum
bool is_scoped_enum
Definition: DWARFASTParserClang.h:303
DWARFASTParserClang::GetOwningClangModule
lldb_private::OptionalClangModuleID GetOwningClangModule(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3331
DWARFASTParserClang::ParseTypeFromClangModule
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.
Definition: DWARFASTParserClang.cpp:133
lldb_private::TypeSystemClang::TemplateParameterInfos
Definition: TypeSystemClang.h:332
lldb_private::Log
Definition: Log.h:115
DWARFASTParserClang::GetDeclContextForBlock
clang::DeclContext * GetDeclContextForBlock(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:3405
DWARFASTParserClang::ParseSingleMember
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)
Definition: DWARFASTParserClang.cpp:2730
ParsedDWARFTypeAttributes::is_artificial
bool is_artificial
Definition: DWARFASTParserClang.h:298
ParsedDWARFTypeAttributes::object_pointer
DWARFDIE object_pointer
Definition: DWARFASTParserClang.h:312
DWARFASTParserClang::m_decl_ctx_to_die
DeclContextToDIEMap m_decl_ctx_to_die
Definition: DWARFASTParserClang.h:124
DWARFASTParserClang::DWARFASTParserClang
DWARFASTParserClang(lldb_private::TypeSystemClang &ast)
Definition: DWARFASTParserClang.cpp:63
ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes
ParsedDWARFTypeAttributes(const DWARFDIE &die)
Definition: DWARFASTParserClang.cpp:268
lldb_private::Declaration
Definition: Declaration.h:24
ParsedDWARFTypeAttributes::exports_symbols
bool exports_symbols
Definition: DWARFASTParserClang.h:307
DWARFASTParserClang::CompleteEnumType
bool CompleteEnumType(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &clang_type)
Definition: DWARFASTParserClang.cpp:2206
lldb::AccessType
AccessType
Definition: lldb-enumerations.h:514
DWARFASTParserClang::ParsePointerToMemberType
lldb::TypeSP ParsePointerToMemberType(const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs)
Definition: DWARFASTParserClang.cpp:1347
DWARFASTParserClang::ParseChildEnumerators
size_t ParseChildEnumerators(lldb_private::CompilerType &compiler_type, bool is_signed, uint32_t enumerator_byte_size, const DWARFDIE &parent_die)
Definition: DWARFASTParserClang.cpp:2290
DWARFASTParserClang::m_clang_ast_importer_up
std::unique_ptr< lldb_private::ClangASTImporter > m_clang_ast_importer_up
Definition: DWARFASTParserClang.h:126
ParsedDWARFTypeAttributes::is_virtual
bool is_virtual
Definition: DWARFASTParserClang.h:305