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 <optional>
14#include <string>
15#include <vector>
16
17#include "lldb/lldb-private.h"
18#include "llvm/ADT/APSInt.h"
19#include "llvm/Support/Casting.h"
20
21namespace lldb_private {
22
23class DataExtractor;
24class TypeSystem;
25
26/// Generic representation of a type in a programming language.
27///
28/// This class serves as an abstraction for a type inside one of the TypeSystems
29/// implemented by the language plugins. It does not have any actual logic in it
30/// but only stores an opaque pointer and a pointer to the TypeSystem that
31/// gives meaning to this opaque pointer. All methods of this class should call
32/// their respective method in the TypeSystem interface and pass the opaque
33/// pointer along.
34///
35/// \see lldb_private::TypeSystem
37public:
38 /// Creates a CompilerType with the given TypeSystem and opaque compiler type.
39 ///
40 /// This constructor should only be called from the respective TypeSystem
41 /// implementation.
42 ///
43 /// \see lldb_private::TypeSystemClang::GetType(clang::QualType)
44 CompilerType(lldb::TypeSystemWP type_system,
46 : m_type_system(type_system), m_type(type) {
47 assert(Verify() && "verification failed");
48 }
49
50 /// This is a minimal wrapper of a TypeSystem shared pointer as
51 /// returned by CompilerType which conventien dyn_cast support.
53 lldb::TypeSystemSP m_typesystem_sp;
54
55 public:
57 TypeSystemSPWrapper(lldb::TypeSystemSP typesystem_sp)
58 : m_typesystem_sp(typesystem_sp) {}
59
60 template <class TypeSystemType> bool isa_and_nonnull() {
61 if (auto *ts = m_typesystem_sp.get())
62 return llvm::isa<TypeSystemType>(ts);
63 return false;
64 }
65
66 /// Return a shared_ptr<TypeSystemType> if dyn_cast succeeds.
67 template <class TypeSystemType>
68 std::shared_ptr<TypeSystemType> dyn_cast_or_null() {
69 if (isa_and_nonnull<TypeSystemType>())
70 return std::shared_ptr<TypeSystemType>(
71 m_typesystem_sp, llvm::cast<TypeSystemType>(m_typesystem_sp.get()));
72 return nullptr;
73 }
74
75 explicit operator bool() const {
76 return static_cast<bool>(m_typesystem_sp);
77 }
78 bool operator==(const TypeSystemSPWrapper &other) const;
79 bool operator!=(const TypeSystemSPWrapper &other) const {
80 return !(*this == other);
81 }
82
83 /// Only to be used in a one-off situations like
84 /// if (typesystem && typesystem->method())
85 /// Do not store this pointer!
86 TypeSystem *operator->() const;
87
88 lldb::TypeSystemSP GetSharedPointer() const { return m_typesystem_sp; }
89 };
90
92 : m_type_system(type_system.GetSharedPointer()), m_type(type) {
93 assert(Verify() && "verification failed");
94 }
95
98
99 CompilerType() = default;
100
101 /// Operators.
102 /// \{
105 m_type = rhs.m_type;
106 return *this;
107 }
108
109 bool operator<(const CompilerType &rhs) const {
110 auto lts = m_type_system.lock();
111 auto rts = rhs.m_type_system.lock();
112 if (lts.get() == rts.get())
113 return m_type < rhs.m_type;
114 return lts.get() < rts.get();
115 }
116 /// \}
117
118 /// Tests.
119 /// \{
120 explicit operator bool() const {
121 return m_type_system.lock() && m_type;
122 }
123
124 bool IsValid() const { return (bool)*this; }
125
126 bool IsArrayType(CompilerType *element_type = nullptr,
127 uint64_t *size = nullptr,
128 bool *is_incomplete = nullptr) const;
129
130 bool IsVectorType(CompilerType *element_type = nullptr,
131 uint64_t *size = nullptr) const;
132
133 bool IsArrayOfScalarType() const;
134
135 bool IsAggregateType() const;
136
137 bool IsAnonymousType() const;
138
139 bool IsScopedEnumerationType() const;
140
141 bool IsBeingDefined() const;
142
143 bool IsCharType() const;
144
145 bool IsCompleteType() const;
146
147 bool IsConst() const;
148
149 bool IsCStringType(uint32_t &length) const;
150
151 bool IsDefined() const;
152
153 bool IsFloatingPointType(uint32_t &count, bool &is_complex) const;
154
155 bool IsFunctionType() const;
156
157 uint32_t IsHomogeneousAggregate(CompilerType *base_type_ptr) const;
158
159 size_t GetNumberOfFunctionArguments() const;
160
161 CompilerType GetFunctionArgumentAtIndex(const size_t index) const;
162
164
165 bool IsFunctionPointerType() const;
166
167 bool
168 IsBlockPointerType(CompilerType *function_pointer_type_ptr = nullptr) const;
169
170 bool IsIntegerType(bool &is_signed) const;
171
172 bool IsEnumerationType(bool &is_signed) const;
173
174 bool IsIntegerOrEnumerationType(bool &is_signed) const;
175
176 bool IsPolymorphicClass() const;
177
178 /// \param target_type Can pass nullptr.
179 bool IsPossibleDynamicType(CompilerType *target_type, bool check_cplusplus,
180 bool check_objc) const;
181
182 bool IsPointerToScalarType() const;
183
184 bool IsRuntimeGeneratedType() const;
185
186 bool IsPointerType(CompilerType *pointee_type = nullptr) const;
187
188 bool IsPointerOrReferenceType(CompilerType *pointee_type = nullptr) const;
189
190 bool IsReferenceType(CompilerType *pointee_type = nullptr,
191 bool *is_rvalue = nullptr) const;
192
194
195 bool IsScalarType() const;
196
197 bool IsTemplateType() const;
198
199 bool IsTypedefType() const;
200
201 bool IsVoidType() const;
202 /// \}
203
204 /// Type Completion.
205 /// \{
206 bool GetCompleteType() const;
207 /// \}
208
209 bool IsForcefullyCompleted() const;
210
211 /// AST related queries.
212 /// \{
213 size_t GetPointerByteSize() const;
214 /// \}
215
216 /// Accessors.
217 /// \{
218
219 /// Returns a shared pointer to the type system. The
220 /// TypeSystem::TypeSystemSPWrapper can be compared for equality.
222
223 ConstString GetTypeName(bool BaseOnly = false) const;
224
226
228 GetTypeInfo(CompilerType *pointee_or_element_compiler_type = nullptr) const;
229
231
233
234 lldb::TypeClass GetTypeClass() const;
235
236 void SetCompilerType(lldb::TypeSystemWP type_system,
238 void SetCompilerType(TypeSystemSPWrapper type_system,
240
241 unsigned GetTypeQualifiers() const;
242 /// \}
243
244 /// Creating related types.
245 /// \{
247
248 CompilerType GetArrayType(uint64_t size) const;
249
251
253
255
256 /// Returns -1 if this isn't a function of if the function doesn't
257 /// have a prototype Returns a value >= 0 if there is a prototype.
258 int GetFunctionArgumentCount() const;
259
261
263
264 size_t GetNumMemberFunctions() const;
265
267
268 /// If this type is a reference to a type (L value or R value reference),
269 /// return a new type with the reference removed, else return the current type
270 /// itself.
272
273 /// If this type is a pointer type, return the type that the pointer points
274 /// to, else return an invalid type.
276
277 /// Return a new CompilerType that is a pointer to this type
279
280 /// Return a new CompilerType that is a L value reference to this type if this
281 /// type is valid and the type system supports L value references, else return
282 /// an invalid type.
284
285 /// Return a new CompilerType that is a R value reference to this type if this
286 /// type is valid and the type system supports R value references, else return
287 /// an invalid type.
289
290 /// Return a new CompilerType adds a const modifier to this type if this type
291 /// is valid and the type system supports const modifiers, else return an
292 /// invalid type.
294
295 /// Return a new CompilerType adds a volatile modifier to this type if this
296 /// type is valid and the type system supports volatile modifiers, else return
297 /// an invalid type.
299
300 /// Return a new CompilerType that is the atomic type of this type. If this
301 /// type is not valid or the type system doesn't support atomic types, this
302 /// returns an invalid type.
304
305 /// Return a new CompilerType adds a restrict modifier to this type if this
306 /// type is valid and the type system supports restrict modifiers, else return
307 /// an invalid type.
309
310 /// Create a typedef to this type using "name" as the name of the typedef this
311 /// type is valid and the type system supports typedefs, else return an
312 /// invalid type.
313 /// \param payload The typesystem-specific \p lldb::Type payload.
314 CompilerType CreateTypedef(const char *name,
315 const CompilerDeclContext &decl_ctx,
316 uint32_t payload) const;
317
318 /// If the current object represents a typedef type, get the underlying type
320
321 /// Create related types using the current type's AST
323 /// \}
324
325 /// Exploring the type.
326 /// \{
327 struct IntegralTemplateArgument;
328
329 /// Return the size of the type in bytes.
330 std::optional<uint64_t> GetByteSize(ExecutionContextScope *exe_scope) const;
331 /// Return the size of the type in bits.
332 std::optional<uint64_t> GetBitSize(ExecutionContextScope *exe_scope) const;
333
334 lldb::Encoding GetEncoding(uint64_t &count) const;
335
336 lldb::Format GetFormat() const;
337
338 std::optional<size_t> GetTypeBitAlign(ExecutionContextScope *exe_scope) const;
339
340 uint32_t GetNumChildren(bool omit_empty_base_classes,
341 const ExecutionContext *exe_ctx) const;
342
344
346
347 /// If this type is an enumeration, iterate through all of its enumerators
348 /// using a callback. If the callback returns true, keep iterating, else abort
349 /// the iteration.
351 std::function<bool(const CompilerType &integer_type, ConstString name,
352 const llvm::APSInt &value)> const &callback) const;
353
354 uint32_t GetNumFields() const;
355
356 CompilerType GetFieldAtIndex(size_t idx, std::string &name,
357 uint64_t *bit_offset_ptr,
358 uint32_t *bitfield_bit_size_ptr,
359 bool *is_bitfield_ptr) const;
360
362
364
366 uint32_t *bit_offset_ptr) const;
367
369 uint32_t *bit_offset_ptr) const;
370
371 uint32_t GetIndexOfFieldWithName(const char *name,
372 CompilerType *field_compiler_type = nullptr,
373 uint64_t *bit_offset_ptr = nullptr,
374 uint32_t *bitfield_bit_size_ptr = nullptr,
375 bool *is_bitfield_ptr = nullptr) const;
376
378 ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers,
379 bool omit_empty_base_classes, bool ignore_array_bounds,
380 std::string &child_name, uint32_t &child_byte_size,
381 int32_t &child_byte_offset, uint32_t &child_bitfield_bit_size,
382 uint32_t &child_bitfield_bit_offset, bool &child_is_base_class,
383 bool &child_is_deref_of_parent, ValueObject *valobj,
384 uint64_t &language_flags) const;
385
386 /// Lookup a child given a name. This function will match base class names and
387 /// member member names in "clang_type" only, not descendants.
388 uint32_t GetIndexOfChildWithName(const char *name,
389 bool omit_empty_base_classes) const;
390
391 /// Lookup a child member given a name. This function will match member names
392 /// only and will descend into "clang_type" children in search for the first
393 /// member in this class, or any base class that matches "name".
394 /// TODO: Return all matches for a given name by returning a
395 /// vector<vector<uint32_t>>
396 /// so we catch all names that match a given child name, not just the first.
397 size_t
398 GetIndexOfChildMemberWithName(const char *name, bool omit_empty_base_classes,
399 std::vector<uint32_t> &child_indexes) const;
400
401 /// Return the number of template arguments the type has.
402 /// If expand_pack is true, then variadic argument packs are automatically
403 /// expanded to their supplied arguments. If it is false an argument pack
404 /// will only count as 1 argument.
405 size_t GetNumTemplateArguments(bool expand_pack = false) const;
406
407 // Return the TemplateArgumentKind of the template argument at index idx.
408 // If expand_pack is true, then variadic argument packs are automatically
409 // expanded to their supplied arguments. With expand_pack set to false, an
410 // arguement pack will count as 1 argument and return a type of Pack.
412 GetTemplateArgumentKind(size_t idx, bool expand_pack = false) const;
414 bool expand_pack = false) const;
415
416 /// Returns the value of the template argument and its type.
417 /// If expand_pack is true, then variadic argument packs are automatically
418 /// expanded to their supplied arguments. With expand_pack set to false, an
419 /// arguement pack will count as 1 argument and it is invalid to call this
420 /// method on the pack argument.
421 std::optional<IntegralTemplateArgument>
422 GetIntegralTemplateArgument(size_t idx, bool expand_pack = false) const;
423
425
427
429 /// \}
430
431 /// Dumping types.
432 /// \{
433#ifndef NDEBUG
434 /// Convenience LLVM-style dump method for use in the debugger only.
435 /// Don't call this function from actual code.
436 LLVM_DUMP_METHOD void dump() const;
437#endif
438
439 void DumpValue(ExecutionContext *exe_ctx, Stream *s, lldb::Format format,
440 const DataExtractor &data, lldb::offset_t data_offset,
441 size_t data_byte_size, uint32_t bitfield_bit_size,
442 uint32_t bitfield_bit_offset, bool show_types,
443 bool show_summary, bool verbose, uint32_t depth);
444
445 bool DumpTypeValue(Stream *s, lldb::Format format, const DataExtractor &data,
446 lldb::offset_t data_offset, size_t data_byte_size,
447 uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
448 ExecutionContextScope *exe_scope);
449
450 void DumpSummary(ExecutionContext *exe_ctx, Stream *s,
451 const DataExtractor &data, lldb::offset_t data_offset,
452 size_t data_byte_size);
453
454 /// Dump to stdout.
457
458 /// Print a description of the type to a stream. The exact implementation
459 /// varies, but the expectation is that eDescriptionLevelFull returns a
460 /// source-like representation of the type, whereas eDescriptionLevelVerbose
461 /// does a dump of the underlying AST if applicable.
464 /// \}
465
466 bool GetValueAsScalar(const DataExtractor &data, lldb::offset_t data_offset,
467 size_t data_byte_size, Scalar &value,
468 ExecutionContextScope *exe_scope) const;
469 void Clear() {
470 m_type_system = {};
471 m_type = nullptr;
472 }
473
474private:
475#ifndef NDEBUG
476 /// If the type is valid, ask the TypeSystem to verify the integrity
477 /// of the type to catch CompilerTypes that mix and match invalid
478 /// TypeSystem/Opaque type pairs.
479 bool Verify() const;
480#endif
481
482 lldb::TypeSystemWP m_type_system;
484};
485
486bool operator==(const CompilerType &lhs, const CompilerType &rhs);
487bool operator!=(const CompilerType &lhs, const CompilerType &rhs);
488
490 llvm::APSInt value;
492};
493
494} // namespace lldb_private
495
496#endif // LLDB_SYMBOL_COMPILERTYPE_H
Represents a generic declaration context in a program.
This is a minimal wrapper of a TypeSystem shared pointer as returned by CompilerType which conventien...
Definition: CompilerType.h:52
bool operator!=(const TypeSystemSPWrapper &other) const
Definition: CompilerType.h:79
lldb::TypeSystemSP GetSharedPointer() const
Definition: CompilerType.h:88
bool operator==(const TypeSystemSPWrapper &other) const
std::shared_ptr< TypeSystemType > dyn_cast_or_null()
Return a shared_ptr<TypeSystemType> if dyn_cast succeeds.
Definition: CompilerType.h:68
TypeSystem * operator->() const
Only to be used in a one-off situations like if (typesystem && typesystem->method()) Do not store thi...
TypeSystemSPWrapper(lldb::TypeSystemSP typesystem_sp)
Definition: CompilerType.h:57
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
CompilerType GetTypeForFormatters() const
CompilerType GetTypeTemplateArgument(size_t idx, bool expand_pack=false) const
lldb::LanguageType GetMinimumLanguage()
bool GetValueAsScalar(const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, Scalar &value, ExecutionContextScope *exe_scope) const
bool Verify() const
If the type is valid, ask the TypeSystem to verify the integrity of the type to catch CompilerTypes t...
bool IsEnumerationType(bool &is_signed) const
lldb::BasicType GetBasicTypeEnumeration() const
std::optional< IntegralTemplateArgument > GetIntegralTemplateArgument(size_t idx, bool expand_pack=false) const
Returns the value of the template argument and its type.
TypeSystemSPWrapper GetTypeSystem() const
Accessors.
CompilerType GetArrayType(uint64_t size) const
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
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) const
Create related types using the current type's AST.
bool IsCStringType(uint32_t &length) const
CompilerType(TypeSystemSPWrapper type_system, lldb::opaque_compiler_type_t type)
Definition: CompilerType.h:91
bool IsPossibleDynamicType(CompilerType *target_type, bool check_cplusplus, bool check_objc) const
void SetCompilerType(lldb::TypeSystemWP type_system, lldb::opaque_compiler_type_t type)
std::optional< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
CompilerType AddConstModifier() const
Return a new CompilerType adds a const modifier to this type if this type is valid and the type syste...
lldb::Encoding GetEncoding(uint64_t &count) const
bool IsArrayType(CompilerType *element_type=nullptr, uint64_t *size=nullptr, bool *is_incomplete=nullptr) const
ConstString GetDisplayTypeName() const
CompilerType GetVirtualBaseClassAtIndex(size_t idx, uint32_t *bit_offset_ptr) const
size_t GetNumMemberFunctions() const
CompilerType GetFunctionArgumentTypeAtIndex(size_t idx) const
uint32_t IsHomogeneousAggregate(CompilerType *base_type_ptr) const
CompilerType GetFieldAtIndex(size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) const
CompilerType GetRValueReferenceType() const
Return a new CompilerType that is a R value reference to this type if this type is valid and the type...
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
lldb::TypeClass GetTypeClass() const
lldb::opaque_compiler_type_t GetOpaqueQualType() const
Definition: CompilerType.h:232
size_t GetNumTemplateArguments(bool expand_pack=false) const
Return the number of template arguments the type has.
CompilerType AddVolatileModifier() const
Return a new CompilerType adds a volatile modifier to this type if this type is valid and the type sy...
CompilerType AddRestrictModifier() const
Return a new CompilerType adds a restrict modifier to this type if this type is valid and the type sy...
lldb::TypeSystemWP m_type_system
Definition: CompilerType.h:482
uint32_t GetNumVirtualBaseClasses() const
size_t GetPointerByteSize() const
AST related queries.
void DumpSummary(ExecutionContext *exe_ctx, Stream *s, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size)
CompilerType GetFunctionArgumentAtIndex(const size_t index) const
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)
CompilerType(const CompilerType &rhs)
Definition: CompilerType.h:96
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.
bool IsFloatingPointType(uint32_t &count, bool &is_complex) const
LLVM_DUMP_METHOD void dump() const
Dumping types.
CompilerType GetLValueReferenceType() const
Return a new CompilerType that is a L value reference to this type if this type is valid and the type...
uint32_t GetNumFields() const
static lldb::BasicType GetBasicTypeEnumeration(ConstString name)
size_t GetNumberOfFunctionArguments() const
CompilerType(lldb::TypeSystemWP type_system, lldb::opaque_compiler_type_t type)
Creates a CompilerType with the given TypeSystem and opaque compiler type.
Definition: CompilerType.h:44
bool IsVariadicFunctionType() const
bool IsIntegerOrEnumerationType(bool &is_signed) const
bool IsScopedEnumerationType() const
bool ShouldTreatScalarValueAsAddress() const
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...
uint32_t GetNumDirectBaseClasses() const
bool IsMeaninglessWithoutDynamicResolution() const
uint32_t GetNumChildren(bool omit_empty_base_classes, const ExecutionContext *exe_ctx) const
bool IsBlockPointerType(CompilerType *function_pointer_type_ptr=nullptr) const
ConstString GetTypeName(bool BaseOnly=false) const
CompilerType GetTypedefedType() const
If the current object represents a typedef type, get the underlying type.
bool IsReferenceType(CompilerType *pointee_type=nullptr, bool *is_rvalue=nullptr) const
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)
CompilerType GetArrayElementType(ExecutionContextScope *exe_scope) const
Creating related types.
bool operator<(const CompilerType &rhs) const
Definition: CompilerType.h:109
lldb::Format GetFormat() const
CompilerType GetFullyUnqualifiedType() const
unsigned GetTypeQualifiers() const
CompilerType GetDirectBaseClassAtIndex(size_t idx, uint32_t *bit_offset_ptr) const
std::optional< size_t > GetTypeBitAlign(ExecutionContextScope *exe_scope) const
bool IsFunctionPointerType() const
CompilerType GetPointeeType() const
If this type is a pointer type, return the type that the pointer points to, else return an invalid ty...
bool IsIntegerType(bool &is_signed) const
bool GetCompleteType() const
Type Completion.
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.
uint32_t GetTypeInfo(CompilerType *pointee_or_element_compiler_type=nullptr) const
int GetFunctionArgumentCount() const
Returns -1 if this isn't a function of if the function doesn't have a prototype Returns a value >= 0 ...
std::optional< uint64_t > GetBitSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bits.
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
CompilerType GetEnumerationIntegerType() const
const CompilerType & operator=(const CompilerType &rhs)
Operators.
Definition: CompilerType.h:103
lldb::opaque_compiler_type_t m_type
Definition: CompilerType.h:483
bool IsForcefullyCompleted() const
uint32_t GetIndexOfChildWithName(const char *name, bool omit_empty_base_classes) const
Lookup a child given a name.
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...
CompilerType GetFunctionReturnType() const
bool IsVectorType(CompilerType *element_type=nullptr, uint64_t *size=nullptr) const
CompilerType GetAtomicType() const
Return a new CompilerType that is the atomic type of this type.
CompilerType GetCanonicalType() const
void DumpTypeDescription(lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) const
Dump to stdout.
bool IsRuntimeGeneratedType() const
lldb::TemplateArgumentKind GetTemplateArgumentKind(size_t idx, bool expand_pack=false) const
LazyBool ShouldPrintAsOneLiner(ValueObject *valobj) const
TypeMemberFunctionImpl GetMemberFunctionAtIndex(size_t idx)
bool IsPointerOrReferenceType(CompilerType *pointee_type=nullptr) const
bool IsPointerToScalarType() const
bool IsPointerType(CompilerType *pointee_type=nullptr) const
A uniqued constant string class.
Definition: ConstString.h:39
An data extractor class.
Definition: DataExtractor.h:48
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Interface for representing a type system.
Definition: TypeSystem.h:77
A class that represents a running process on the host machine.
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1022
bool operator==(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1016
void * opaque_compiler_type_t
Definition: lldb-types.h:90
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ eDescriptionLevelFull
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
Format
Display format definitions.
uint64_t offset_t
Definition: lldb-types.h:87
LanguageType
Programming language type.
Encoding
Register encoding definitions.