LLDB  mainline
CompilerType.h
Go to the documentation of this file.
1 //===-- CompilerType.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_SYMBOL_COMPILERTYPE_H
10 #define LLDB_SYMBOL_COMPILERTYPE_H
11 
12 #include <functional>
13 #include <string>
14 #include <vector>
15 
16 #include "lldb/lldb-private.h"
17 #include "llvm/ADT/APSInt.h"
18 
19 namespace lldb_private {
20 
21 class DataExtractor;
22 
23 /// Generic representation of a type in a programming language.
24 ///
25 /// This class serves as an abstraction for a type inside one of the TypeSystems
26 /// implemented by the language plugins. It does not have any actual logic in it
27 /// but only stores an opaque pointer and a pointer to the TypeSystem that
28 /// gives meaning to this opaque pointer. All methods of this class should call
29 /// their respective method in the TypeSystem interface and pass the opaque
30 /// pointer along.
31 ///
32 /// \see lldb_private::TypeSystem
33 class CompilerType {
34 public:
35  /// Creates a CompilerType with the given TypeSystem and opaque compiler type.
36  ///
37  /// This constructor should only be called from the respective TypeSystem
38  /// implementation.
39  ///
40  /// \see lldb_private::TypeSystemClang::GetType(clang::QualType)
42  : m_type(type), m_type_system(type_system) {
43  assert(Verify() && "verification failed");
44  }
45 
48 
49  CompilerType() = default;
50 
51  /// Operators.
52  /// \{
53  const CompilerType &operator=(const CompilerType &rhs) {
54  m_type = rhs.m_type;
56  return *this;
57  }
58 
59  bool operator<(const CompilerType &rhs) const {
60  if (m_type_system == rhs.m_type_system)
61  return m_type < rhs.m_type;
62  return m_type_system < rhs.m_type_system;
63  }
64  /// \}
65 
66  /// Tests.
67  /// \{
68  explicit operator bool() const {
69  return m_type != nullptr && m_type_system != nullptr;
70  }
71 
72  bool IsValid() const { return m_type != nullptr && m_type_system != nullptr; }
73 
74  bool IsArrayType(CompilerType *element_type = nullptr,
75  uint64_t *size = nullptr,
76  bool *is_incomplete = nullptr) const;
77 
78  bool IsVectorType(CompilerType *element_type = nullptr,
79  uint64_t *size = nullptr) const;
80 
81  bool IsArrayOfScalarType() const;
82 
83  bool IsAggregateType() const;
84 
85  bool IsAnonymousType() const;
86 
87  bool IsScopedEnumerationType() const;
88 
89  bool IsBeingDefined() const;
90 
91  bool IsCharType() const;
92 
93  bool IsCompleteType() const;
94 
95  bool IsConst() const;
96 
97  bool IsCStringType(uint32_t &length) const;
98 
99  bool IsDefined() const;
100 
101  bool IsFloatingPointType(uint32_t &count, bool &is_complex) const;
102 
103  bool IsFunctionType() const;
104 
105  uint32_t IsHomogeneousAggregate(CompilerType *base_type_ptr) const;
106 
107  size_t GetNumberOfFunctionArguments() const;
108 
109  CompilerType GetFunctionArgumentAtIndex(const size_t index) const;
110 
111  bool IsVariadicFunctionType() const;
112 
113  bool IsFunctionPointerType() const;
114 
115  bool
116  IsBlockPointerType(CompilerType *function_pointer_type_ptr = nullptr) const;
117 
118  bool IsIntegerType(bool &is_signed) const;
119 
120  bool IsEnumerationType(bool &is_signed) const;
121 
122  bool IsIntegerOrEnumerationType(bool &is_signed) const;
123 
124  bool IsPolymorphicClass() const;
125 
126  /// \param target_type Can pass nullptr.
127  bool IsPossibleDynamicType(CompilerType *target_type, bool check_cplusplus,
128  bool check_objc) const;
129 
130  bool IsPointerToScalarType() const;
131 
132  bool IsRuntimeGeneratedType() const;
133 
134  bool IsPointerType(CompilerType *pointee_type = nullptr) const;
135 
136  bool IsPointerOrReferenceType(CompilerType *pointee_type = nullptr) const;
137 
138  bool IsReferenceType(CompilerType *pointee_type = nullptr,
139  bool *is_rvalue = nullptr) const;
140 
141  bool ShouldTreatScalarValueAsAddress() const;
142 
143  bool IsScalarType() const;
144 
145  bool IsTypedefType() const;
146 
147  bool IsVoidType() const;
148  /// \}
149 
150  /// Type Completion.
151  /// \{
152  bool GetCompleteType() const;
153  /// \}
154 
155  /// AST related queries.
156  /// \{
157  size_t GetPointerByteSize() const;
158  /// \}
159 
160  /// Accessors.
161  /// \{
163 
164  ConstString GetTypeName() const;
165 
167 
168  uint32_t
169  GetTypeInfo(CompilerType *pointee_or_element_compiler_type = nullptr) const;
170 
172 
174 
175  lldb::TypeClass GetTypeClass() const;
176 
177  void SetCompilerType(TypeSystem *type_system,
179 
180  unsigned GetTypeQualifiers() const;
181  /// \}
182 
183  /// Creating related types.
184  /// \{
186 
187  CompilerType GetArrayType(uint64_t size) const;
188 
190 
192 
194 
195  /// Returns -1 if this isn't a function of if the function doesn't
196  /// have a prototype Returns a value >= 0 if there is a prototype.
197  int GetFunctionArgumentCount() const;
198 
200 
202 
203  size_t GetNumMemberFunctions() const;
204 
206 
207  /// If this type is a reference to a type (L value or R value reference),
208  /// return a new type with the reference removed, else return the current type
209  /// itself.
211 
212  /// If this type is a pointer type, return the type that the pointer points
213  /// to, else return an invalid type.
215 
216  /// Return a new CompilerType that is a pointer to this type
218 
219  /// Return a new CompilerType that is a L value reference to this type if this
220  /// type is valid and the type system supports L value references, else return
221  /// an invalid type.
223 
224  /// Return a new CompilerType that is a R value reference to this type if this
225  /// type is valid and the type system supports R value references, else return
226  /// an invalid type.
228 
229  /// Return a new CompilerType adds a const modifier to this type if this type
230  /// is valid and the type system supports const modifiers, else return an
231  /// invalid type.
233 
234  /// Return a new CompilerType adds a volatile modifier to this type if this
235  /// type is valid and the type system supports volatile modifiers, else return
236  /// an invalid type.
238 
239  /// Return a new CompilerType that is the atomic type of this type. If this
240  /// type is not valid or the type system doesn't support atomic types, this
241  /// returns an invalid type.
242  CompilerType GetAtomicType() const;
243 
244  /// Return a new CompilerType adds a restrict modifier to this type if this
245  /// type is valid and the type system supports restrict modifiers, else return
246  /// an invalid type.
248 
249  /// Create a typedef to this type using "name" as the name of the typedef this
250  /// type is valid and the type system supports typedefs, else return an
251  /// invalid type.
252  /// \param payload The typesystem-specific \p lldb::Type payload.
253  CompilerType CreateTypedef(const char *name,
254  const CompilerDeclContext &decl_ctx,
255  uint32_t payload) const;
256 
257  /// If the current object represents a typedef type, get the underlying type
259 
260  /// Create related types using the current type's AST
262  /// \}
263 
264  /// Exploring the type.
265  /// \{
266  struct IntegralTemplateArgument;
267 
268  /// Return the size of the type in bytes.
269  llvm::Optional<uint64_t> GetByteSize(ExecutionContextScope *exe_scope) const;
270  /// Return the size of the type in bits.
271  llvm::Optional<uint64_t> GetBitSize(ExecutionContextScope *exe_scope) const;
272 
273  lldb::Encoding GetEncoding(uint64_t &count) const;
274 
275  lldb::Format GetFormat() const;
276 
277  llvm::Optional<size_t>
278  GetTypeBitAlign(ExecutionContextScope *exe_scope) const;
279 
280  uint32_t GetNumChildren(bool omit_empty_base_classes,
281  const ExecutionContext *exe_ctx) const;
282 
284 
286 
287  /// If this type is an enumeration, iterate through all of its enumerators
288  /// using a callback. If the callback returns true, keep iterating, else abort
289  /// the iteration.
290  void ForEachEnumerator(
291  std::function<bool(const CompilerType &integer_type, ConstString name,
292  const llvm::APSInt &value)> const &callback) const;
293 
294  uint32_t GetNumFields() const;
295 
296  CompilerType GetFieldAtIndex(size_t idx, std::string &name,
297  uint64_t *bit_offset_ptr,
298  uint32_t *bitfield_bit_size_ptr,
299  bool *is_bitfield_ptr) const;
300 
302 
304 
306  uint32_t *bit_offset_ptr) const;
307 
309  uint32_t *bit_offset_ptr) const;
310 
311  uint32_t GetIndexOfFieldWithName(const char *name,
312  CompilerType *field_compiler_type = nullptr,
313  uint64_t *bit_offset_ptr = nullptr,
314  uint32_t *bitfield_bit_size_ptr = nullptr,
315  bool *is_bitfield_ptr = nullptr) const;
316 
318  ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers,
319  bool omit_empty_base_classes, bool ignore_array_bounds,
320  std::string &child_name, uint32_t &child_byte_size,
321  int32_t &child_byte_offset, uint32_t &child_bitfield_bit_size,
322  uint32_t &child_bitfield_bit_offset, bool &child_is_base_class,
323  bool &child_is_deref_of_parent, ValueObject *valobj,
324  uint64_t &language_flags) const;
325 
326  /// Lookup a child given a name. This function will match base class names and
327  /// member member names in "clang_type" only, not descendants.
328  uint32_t GetIndexOfChildWithName(const char *name,
329  bool omit_empty_base_classes) const;
330 
331  /// Lookup a child member given a name. This function will match member names
332  /// only and will descend into "clang_type" children in search for the first
333  /// member in this class, or any base class that matches "name".
334  /// TODO: Return all matches for a given name by returning a
335  /// vector<vector<uint32_t>>
336  /// so we catch all names that match a given child name, not just the first.
337  size_t
338  GetIndexOfChildMemberWithName(const char *name, bool omit_empty_base_classes,
339  std::vector<uint32_t> &child_indexes) const;
340 
341  size_t GetNumTemplateArguments() const;
342 
344  CompilerType GetTypeTemplateArgument(size_t idx) const;
345 
346  /// Returns the value of the template argument and its type.
347  llvm::Optional<IntegralTemplateArgument>
348  GetIntegralTemplateArgument(size_t idx) const;
349 
351 
353 
355  /// \}
356 
357  /// Dumping types.
358  /// \{
359 #ifndef NDEBUG
360  /// Convenience LLVM-style dump method for use in the debugger only.
361  /// Don't call this function from actual code.
362  LLVM_DUMP_METHOD void dump() const;
363 #endif
364 
365  void DumpValue(ExecutionContext *exe_ctx, Stream *s, lldb::Format format,
366  const DataExtractor &data, lldb::offset_t data_offset,
367  size_t data_byte_size, uint32_t bitfield_bit_size,
368  uint32_t bitfield_bit_offset, bool show_types,
369  bool show_summary, bool verbose, uint32_t depth);
370 
371  bool DumpTypeValue(Stream *s, lldb::Format format, const DataExtractor &data,
372  lldb::offset_t data_offset, size_t data_byte_size,
373  uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
374  ExecutionContextScope *exe_scope);
375 
376  void DumpSummary(ExecutionContext *exe_ctx, Stream *s,
377  const DataExtractor &data, lldb::offset_t data_offset,
378  size_t data_byte_size);
379 
380  /// Dump to stdout.
383 
384  /// Print a description of the type to a stream. The exact implementation
385  /// varies, but the expectation is that eDescriptionLevelFull returns a
386  /// source-like representation of the type, whereas eDescriptionLevelVerbose
387  /// does a dump of the underlying AST if applicable.
390  /// \}
391 
392  bool GetValueAsScalar(const DataExtractor &data, lldb::offset_t data_offset,
393  size_t data_byte_size, Scalar &value,
394  ExecutionContextScope *exe_scope) const;
395  void Clear() {
396  m_type = nullptr;
397  m_type_system = nullptr;
398  }
399 
400 private:
401 #ifndef NDEBUG
402  /// If the type is valid, ask the TypeSystem to verify the integrity
403  /// of the type to catch CompilerTypes that mix and match invalid
404  /// TypeSystem/Opaque type pairs.
405  bool Verify() const;
406 #endif
407 
410 };
411 
412 bool operator==(const CompilerType &lhs, const CompilerType &rhs);
413 bool operator!=(const CompilerType &lhs, const CompilerType &rhs);
414 
416  llvm::APSInt value;
418 };
419 
420 } // namespace lldb_private
421 
422 #endif // LLDB_SYMBOL_COMPILERTYPE_H
lldb_private::CompilerType::GetNonReferenceType
CompilerType GetNonReferenceType() const
If this type is a reference to a type (L value or R value reference), return a new type with the refe...
Definition: CompilerType.cpp:394
lldb_private::CompilerType::GetValueAsScalar
bool GetValueAsScalar(const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, Scalar &value, ExecutionContextScope *exe_scope) const
Definition: CompilerType.cpp:780
lldb_private::CompilerType::GetIntegralTemplateArgument
llvm::Optional< IntegralTemplateArgument > GetIntegralTemplateArgument(size_t idx) const
Returns the value of the template argument and its type.
Definition: CompilerType.cpp:683
lldb_private::CompilerType::IsPointerOrReferenceType
bool IsPointerOrReferenceType(CompilerType *pointee_type=nullptr) const
Definition: CompilerType.cpp:166
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::CompilerType::IsCharType
bool IsCharType() const
Definition: CompilerType.cpp:77
lldb_private::CompilerType::ShouldTreatScalarValueAsAddress
bool ShouldTreatScalarValueAsAddress() const
Definition: CompilerType.cpp:185
lldb_private::CompilerType::IsAnonymousType
bool IsAnonymousType() const
Definition: CompilerType.cpp:37
lldb::Format
Format
Display format definitions.
Definition: lldb-enumerations.h:155
lldb_private::CompilerType::CompilerType
CompilerType(TypeSystem *type_system, lldb::opaque_compiler_type_t type)
Creates a CompilerType with the given TypeSystem and opaque compiler type.
Definition: CompilerType.h:41
lldb_private::CompilerType::IsDefined
bool IsDefined() const
Definition: CompilerType.cpp:201
lldb_private::CompilerType::GetNumTemplateArguments
size_t GetNumTemplateArguments() const
Definition: CompilerType.cpp:662
lldb_private::CompilerType::Verify
bool Verify() const
If the type is valid, ask the TypeSystem to verify the integrity of the type to catch CompilerTypes t...
Definition: CompilerType.cpp:882
lldb_private::CompilerType::m_type
lldb::opaque_compiler_type_t m_type
Definition: CompilerType.h:408
lldb_private::CompilerType::GetNumVirtualBaseClasses
uint32_t GetNumVirtualBaseClasses() const
Definition: CompilerType.cpp:559
lldb_private::CompilerType::IntegralTemplateArgument
Definition: CompilerType.h:415
lldb_private::CompilerType::IsVectorType
bool IsVectorType(CompilerType *element_type=nullptr, uint64_t *size=nullptr) const
Definition: CompilerType.cpp:64
lldb_private::CompilerType::GetIndexOfChildMemberWithName
size_t GetIndexOfChildMemberWithName(const char *name, bool omit_empty_base_classes, std::vector< uint32_t > &child_indexes) const
Lookup a child member given a name.
Definition: CompilerType.cpp:652
lldb_private::CompilerType::IsCompleteType
bool IsCompleteType() const
Definition: CompilerType.cpp:83
lldb_private::Scalar
Definition: Scalar.h:34
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::CompilerType::GetIndexOfFieldWithName
uint32_t GetIndexOfFieldWithName(const char *name, CompilerType *field_compiler_type=nullptr, uint64_t *bit_offset_ptr=nullptr, uint32_t *bitfield_bit_size_ptr=nullptr, bool *is_bitfield_ptr=nullptr) const
Definition: CompilerType.cpp:583
lldb_private::CompilerType::IsScopedEnumerationType
bool IsScopedEnumerationType() const
Definition: CompilerType.cpp:43
lldb_private::CompilerType::GetByteSize
llvm::Optional< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
Definition: CompilerType.cpp:489
lldb_private::CompilerType::GetOpaqueQualType
lldb::opaque_compiler_type_t GetOpaqueQualType() const
Definition: CompilerType.h:173
lldb::offset_t
uint64_t offset_t
Definition: lldb-types.h:87
lldb_private::CompilerType::IsPointerToScalarType
bool IsPointerToScalarType() const
Definition: CompilerType.cpp:242
lldb_private::CompilerType::IsFunctionPointerType
bool IsFunctionPointerType() const
Definition: CompilerType.cpp:128
lldb_private::CompilerType::GetTypeClass
lldb::TypeClass GetTypeClass() const
Definition: CompilerType.cpp:305
lldb_private::CompilerType::AddVolatileModifier
CompilerType AddVolatileModifier() const
Return a new CompilerType adds a volatile modifier to this type if this type is valid and the type sy...
Definition: CompilerType.cpp:441
lldb_private::Stream
Definition: Stream.h:28
lldb_private::CompilerType::IsAggregateType
bool IsAggregateType() const
Definition: CompilerType.cpp:31
lldb_private::CompilerType::IsFloatingPointType
bool IsFloatingPointType(uint32_t &count, bool &is_complex) const
Definition: CompilerType.cpp:191
lldb::BasicType
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
Definition: lldb-enumerations.h:741
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb_private::CompilerType::GetVirtualBaseClassAtIndex
CompilerType GetVirtualBaseClassAtIndex(size_t idx, uint32_t *bit_offset_ptr) const
Definition: CompilerType.cpp:575
lldb_private::CompilerType::DumpSummary
void DumpSummary(ExecutionContext *exe_ctx, Stream *s, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size)
Definition: CompilerType.cpp:750
lldb_private::CompilerType::GetFunctionArgumentTypeAtIndex
CompilerType GetFunctionArgumentTypeAtIndex(size_t idx) const
Definition: CompilerType.cpp:366
lldb_private::CompilerType::GetNumDirectBaseClasses
uint32_t GetNumDirectBaseClasses() const
Definition: CompilerType.cpp:553
lldb_private::CompilerType::GetIndexOfChildWithName
uint32_t GetIndexOfChildWithName(const char *name, bool omit_empty_base_classes) const
Lookup a child given a name.
Definition: CompilerType.cpp:712
lldb_private::CompilerType::operator<
bool operator<(const CompilerType &rhs) const
Definition: CompilerType.h:59
lldb_private::CompilerType::IsVariadicFunctionType
bool IsVariadicFunctionType() const
lldb_private::CompilerType::GetFunctionArgumentAtIndex
CompilerType GetFunctionArgumentAtIndex(const size_t index) const
Definition: CompilerType.cpp:122
lldb_private::CompilerType::IsIntegerOrEnumerationType
bool IsIntegerOrEnumerationType(bool &is_signed) const
Definition: CompilerType.cpp:153
lldb_private::CompilerType::IsConst
bool IsConst() const
Definition: CompilerType.cpp:89
lldb_private::CompilerType::GetTypeTemplateArgument
CompilerType GetTypeTemplateArgument(size_t idx) const
Definition: CompilerType.cpp:675
lldb_private::CompilerType::IsHomogeneousAggregate
uint32_t IsHomogeneousAggregate(CompilerType *base_type_ptr) const
Definition: CompilerType.cpp:109
lldb_private::operator==
bool operator==(const Address &lhs, const Address &rhs)
Definition: Address.cpp:999
lldb_private::CompilerType::GetPointeeType
CompilerType GetPointeeType() const
If this type is a pointer type, return the type that the pointer points to, else return an invalid ty...
Definition: CompilerType.cpp:400
lldb_private::CompilerType::IsMeaninglessWithoutDynamicResolution
bool IsMeaninglessWithoutDynamicResolution() const
Definition: CompilerType.cpp:701
lldb_private::CompilerType::GetDisplayTypeName
ConstString GetDisplayTypeName() const
Definition: CompilerType.cpp:284
lldb_private::CompilerType::IsPossibleDynamicType
bool IsPossibleDynamicType(CompilerType *target_type, bool check_cplusplus, bool check_objc) const
Definition: CompilerType.cpp:214
lldb_private::CompilerType::Clear
void Clear()
Definition: CompilerType.h:395
lldb_private::CompilerType::IsFunctionType
bool IsFunctionType() const
Definition: CompilerType.cpp:101
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::ExecutionContextScope
Definition: ExecutionContextScope.h:32
lldb_private::CompilerType::CreateTypedef
CompilerType CreateTypedef(const char *name, const CompilerDeclContext &decl_ctx, uint32_t payload) const
Create a typedef to this type using "name" as the name of the typedef this type is valid and the type...
Definition: CompilerType.cpp:455
lldb_private::CompilerType::GetBasicTypeEnumeration
lldb::BasicType GetBasicTypeEnumeration() const
Definition: CompilerType.cpp:523
lldb_private::CompilerType::GetFormat
lldb::Format GetFormat() const
Definition: CompilerType.cpp:508
lldb_private::CompilerType::IntegralTemplateArgument::value
llvm::APSInt value
Definition: CompilerType.h:416
lldb_private::CompilerType::GetAtomicType
CompilerType GetAtomicType() const
Return a new CompilerType that is the atomic type of this type.
Definition: CompilerType.cpp:428
lldb_private::CompilerType::IsArrayOfScalarType
bool IsArrayOfScalarType() const
Definition: CompilerType.cpp:249
lldb_private::CompilerType::DumpValue
void DumpValue(ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, bool show_types, bool show_summary, bool verbose, uint32_t depth)
Definition: CompilerType.cpp:723
lldb_private::CompilerType::CompilerType
CompilerType(const CompilerType &rhs)
Definition: CompilerType.h:46
lldb_private::CompilerType::GetChildCompilerTypeAtIndex
CompilerType GetChildCompilerTypeAtIndex(ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers, bool omit_empty_base_classes, bool ignore_array_bounds, std::string &child_name, uint32_t &child_byte_size, int32_t &child_byte_offset, uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset, bool &child_is_base_class, bool &child_is_deref_of_parent, ValueObject *valobj, uint64_t &language_flags) const
Definition: CompilerType.cpp:602
lldb_private::CompilerType::operator=
const CompilerType & operator=(const CompilerType &rhs)
Operators.
Definition: CompilerType.h:53
lldb_private::CompilerType::GetNumMemberFunctions
size_t GetNumMemberFunctions() const
Definition: CompilerType.cpp:380
lldb_private::CompilerType::IsRuntimeGeneratedType
bool IsRuntimeGeneratedType() const
Definition: CompilerType.cpp:71
lldb_private::CompilerType::IsEnumerationType
bool IsEnumerationType(bool &is_signed) const
Definition: CompilerType.cpp:147
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::CompilerType::AddConstModifier
CompilerType AddConstModifier() const
Return a new CompilerType adds a const modifier to this type if this type is valid and the type syste...
Definition: CompilerType.cpp:434
lldb_private::CompilerType::GetNumberOfFunctionArguments
size_t GetNumberOfFunctionArguments() const
Definition: CompilerType.cpp:115
lldb::eDescriptionLevelFull
@ eDescriptionLevelFull
Definition: lldb-enumerations.h:209
lldb_private::CompilerType::IsVoidType
bool IsVoidType() const
Definition: CompilerType.cpp:236
lldb_private::CompilerType::GetArrayElementType
CompilerType GetArrayElementType(ExecutionContextScope *exe_scope) const
Creating related types.
Definition: CompilerType.cpp:327
lldb_private::CompilerType::IsReferenceType
bool IsReferenceType(CompilerType *pointee_type=nullptr, bool *is_rvalue=nullptr) const
Definition: CompilerType.cpp:175
lldb_private::CompilerType::IsTypedefType
bool IsTypedefType() const
Definition: CompilerType.cpp:230
lldb_private::CompilerType::GetTypeQualifiers
unsigned GetTypeQualifiers() const
Definition: CompilerType.cpp:318
lldb_private::CompilerType::IsIntegerType
bool IsIntegerType(bool &is_signed) const
Definition: CompilerType.cpp:141
lldb_private::CompilerType::GetNumFields
uint32_t GetNumFields() const
Definition: CompilerType.cpp:537
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::CompilerType::GetEncoding
lldb::Encoding GetEncoding(uint64_t &count) const
Definition: CompilerType.cpp:501
lldb_private::CompilerType::GetFunctionReturnType
CompilerType GetFunctionReturnType() const
Definition: CompilerType.cpp:373
lldb::TemplateArgumentKind
TemplateArgumentKind
Definition: lldb-enumerations.h:814
lldb_private::CompilerType::IsValid
bool IsValid() const
Definition: CompilerType.h:72
lldb_private::CompilerDeclContext
Represents a generic declaration context in a program.
Definition: CompilerDeclContext.h:30
lldb_private::CompilerType::GetLValueReferenceType
CompilerType GetLValueReferenceType() const
Return a new CompilerType that is a L value reference to this type if this type is valid and the type...
Definition: CompilerType.cpp:414
lldb_private::operator!=
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1005
lldb_private::CompilerType::GetPointerByteSize
size_t GetPointerByteSize() const
AST related queries.
Definition: CompilerType.cpp:271
lldb_private::CompilerType::GetNumChildren
uint32_t GetNumChildren(bool omit_empty_base_classes, const ExecutionContext *exe_ctx) const
Definition: CompilerType.cpp:515
lldb-private.h
lldb_private::CompilerType::GetCompleteType
bool GetCompleteType() const
Type Completion.
Definition: CompilerType.cpp:264
lldb_private::CompilerType::IsScalarType
bool IsScalarType() const
Definition: CompilerType.cpp:223
lldb_private::CompilerType::IsBlockPointerType
bool IsBlockPointerType(CompilerType *function_pointer_type_ptr=nullptr) const
Definition: CompilerType.cpp:134
lldb_private::CompilerType::CompilerType
CompilerType()=default
lldb_private::CompilerType::GetFunctionArgumentCount
int GetFunctionArgumentCount() const
Returns -1 if this isn't a function of if the function doesn't have a prototype Returns a value >= 0 ...
Definition: CompilerType.cpp:359
lldb_private::CompilerType::ShouldPrintAsOneLiner
LazyBool ShouldPrintAsOneLiner(ValueObject *valobj) const
Definition: CompilerType.cpp:695
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::CompilerType::GetPointerType
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
Definition: CompilerType.cpp:407
uint32_t
lldb_private::CompilerType::SetCompilerType
void SetCompilerType(TypeSystem *type_system, lldb::opaque_compiler_type_t type)
Definition: CompilerType.cpp:312
lldb_private::CompilerType::GetDirectBaseClassAtIndex
CompilerType GetDirectBaseClassAtIndex(size_t idx, uint32_t *bit_offset_ptr) const
Definition: CompilerType.cpp:566
lldb_private::CompilerType::IsPolymorphicClass
bool IsPolymorphicClass() const
Definition: CompilerType.cpp:207
lldb_private::CompilerType::IsPointerType
bool IsPointerType(CompilerType *pointee_type=nullptr) const
Definition: CompilerType.cpp:157
lldb_private::CompilerType::GetTypeSystem
TypeSystem * GetTypeSystem() const
Accessors.
Definition: CompilerType.h:162
lldb_private::CompilerType::GetBitSize
llvm::Optional< uint64_t > GetBitSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bits.
Definition: CompilerType.cpp:482
lldb_private::CompilerType::IntegralTemplateArgument::type
CompilerType type
Definition: CompilerType.h:417
lldb_private::CompilerType::GetTypeName
ConstString GetTypeName() const
Definition: CompilerType.cpp:277
lldb_private::CompilerType::GetCanonicalType
CompilerType GetCanonicalType() const
Definition: CompilerType.cpp:341
lldb_private::CompilerType::GetTypeInfo
uint32_t GetTypeInfo(CompilerType *pointee_or_element_compiler_type=nullptr) const
Definition: CompilerType.cpp:290
lldb_private::CompilerType::IsArrayType
bool IsArrayType(CompilerType *element_type=nullptr, uint64_t *size=nullptr, bool *is_incomplete=nullptr) const
Definition: CompilerType.cpp:49
lldb_private::CompilerType::GetTemplateArgumentKind
lldb::TemplateArgumentKind GetTemplateArgumentKind(size_t idx) const
Definition: CompilerType.cpp:669
lldb_private::CompilerType::AddRestrictModifier
CompilerType AddRestrictModifier() const
Return a new CompilerType adds a restrict modifier to this type if this type is valid and the type sy...
Definition: CompilerType.cpp:448
lldb::Encoding
Encoding
Register encoding definitions.
Definition: lldb-enumerations.h:146
lldb_private::CompilerType::GetBasicTypeFromAST
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) const
Create related types using the current type's AST.
Definition: CompilerType.cpp:474
lldb_private::CompilerType::GetTypedefedType
CompilerType GetTypedefedType() const
If the current object represents a typedef type, get the underlying type.
Definition: CompilerType.cpp:464
lldb_private::CompilerType::GetEnumerationIntegerType
CompilerType GetEnumerationIntegerType() const
Definition: CompilerType.cpp:353
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::TypeSystem
Interface for representing a type system.
Definition: TypeSystem.h:71
lldb_private::CompilerType::GetMinimumLanguage
lldb::LanguageType GetMinimumLanguage()
Definition: CompilerType.cpp:298
lldb_private::CompilerType::m_type_system
TypeSystem * m_type_system
Definition: CompilerType.h:409
lldb_private::CompilerType::IsBeingDefined
bool IsBeingDefined() const
Definition: CompilerType.cpp:256
lldb_private::CompilerType::DumpTypeValue
bool DumpTypeValue(Stream *s, lldb::Format format, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, ExecutionContextScope *exe_scope)
Definition: CompilerType.cpp:737
lldb_private::CompilerType::GetMemberFunctionAtIndex
TypeMemberFunctionImpl GetMemberFunctionAtIndex(size_t idx)
Definition: CompilerType.cpp:387
lldb_private::CompilerType::GetFieldAtIndex
CompilerType GetFieldAtIndex(size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) const
Definition: CompilerType.cpp:543
lldb_private::TypeMemberFunctionImpl
Definition: Type.h:435
lldb_private::CompilerType::GetTypeForFormatters
CompilerType GetTypeForFormatters() const
Definition: CompilerType.cpp:689
lldb_private::CompilerType::ForEachEnumerator
void ForEachEnumerator(std::function< bool(const CompilerType &integer_type, ConstString name, const llvm::APSInt &value)> const &callback) const
If this type is an enumeration, iterate through all of its enumerators using a callback.
Definition: CompilerType.cpp:529
lldb_private::CompilerType::dump
LLVM_DUMP_METHOD void dump() const
Dumping types.
Definition: CompilerType.cpp:772
lldb_private::CompilerType::GetTypeBitAlign
llvm::Optional< size_t > GetTypeBitAlign(ExecutionContextScope *exe_scope) const
Definition: CompilerType.cpp:495
lldb::opaque_compiler_type_t
void * opaque_compiler_type_t
Definition: lldb-types.h:90
lldb_private::CompilerType::GetRValueReferenceType
CompilerType GetRValueReferenceType() const
Return a new CompilerType that is a R value reference to this type if this type is valid and the type...
Definition: CompilerType.cpp:421
lldb_private::CompilerType::GetFullyUnqualifiedType
CompilerType GetFullyUnqualifiedType() const
Definition: CompilerType.cpp:347
lldb_private::CompilerType::DumpTypeDescription
void DumpTypeDescription(lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) const
Dump to stdout.
Definition: CompilerType.cpp:759
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207
lldb_private::CompilerType::GetArrayType
CompilerType GetArrayType(uint64_t size) const
Definition: CompilerType.cpp:334
lldb_private::CompilerType::IsCStringType
bool IsCStringType(uint32_t &length) const
Definition: CompilerType.cpp:95