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 IsMemberFunctionPointerType() const;
168
169 bool
170 IsBlockPointerType(CompilerType *function_pointer_type_ptr = nullptr) const;
171
172 bool IsIntegerType(bool &is_signed) const;
173
174 bool IsEnumerationType(bool &is_signed) const;
175
176 bool IsIntegerOrEnumerationType(bool &is_signed) const;
177
178 bool IsPolymorphicClass() const;
179
180 /// \param target_type Can pass nullptr.
181 bool IsPossibleDynamicType(CompilerType *target_type, bool check_cplusplus,
182 bool check_objc) const;
183
184 bool IsPointerToScalarType() const;
185
186 bool IsRuntimeGeneratedType() const;
187
188 bool IsPointerType(CompilerType *pointee_type = nullptr) const;
189
190 bool IsPointerOrReferenceType(CompilerType *pointee_type = nullptr) const;
191
192 bool IsReferenceType(CompilerType *pointee_type = nullptr,
193 bool *is_rvalue = nullptr) const;
194
196
197 bool IsScalarType() const;
198
199 bool IsTemplateType() const;
200
201 bool IsTypedefType() const;
202
203 bool IsVoidType() const;
204 /// \}
205
206 /// Type Completion.
207 /// \{
208 bool GetCompleteType() const;
209 /// \}
210
211 bool IsForcefullyCompleted() const;
212
213 /// AST related queries.
214 /// \{
215 size_t GetPointerByteSize() const;
216 /// \}
217
218 /// Accessors.
219 /// \{
220
221 /// Returns a shared pointer to the type system. The
222 /// TypeSystem::TypeSystemSPWrapper can be compared for equality.
224
225 ConstString GetTypeName(bool BaseOnly = false) const;
226
228
230 GetTypeInfo(CompilerType *pointee_or_element_compiler_type = nullptr) const;
231
233
235
236 lldb::TypeClass GetTypeClass() const;
237
238 void SetCompilerType(lldb::TypeSystemWP type_system,
240 void SetCompilerType(TypeSystemSPWrapper type_system,
242
243 unsigned GetTypeQualifiers() const;
244 /// \}
245
246 /// Creating related types.
247 /// \{
249
250 CompilerType GetArrayType(uint64_t size) const;
251
253
255
257
258 /// Returns -1 if this isn't a function of if the function doesn't
259 /// have a prototype Returns a value >= 0 if there is a prototype.
260 int GetFunctionArgumentCount() const;
261
263
265
266 size_t GetNumMemberFunctions() const;
267
269
270 /// If this type is a reference to a type (L value or R value reference),
271 /// return a new type with the reference removed, else return the current type
272 /// itself.
274
275 /// If this type is a pointer type, return the type that the pointer points
276 /// to, else return an invalid type.
278
279 /// Return a new CompilerType that is a pointer to this type
281
282 /// Return a new CompilerType that is a L value reference to this type if this
283 /// type is valid and the type system supports L value references, else return
284 /// an invalid type.
286
287 /// Return a new CompilerType that is a R value reference to this type if this
288 /// type is valid and the type system supports R value references, else return
289 /// an invalid type.
291
292 /// Return a new CompilerType adds a const modifier to this type if this type
293 /// is valid and the type system supports const modifiers, else return an
294 /// invalid type.
296
297 /// Return a new CompilerType adds a volatile modifier to this type if this
298 /// type is valid and the type system supports volatile modifiers, else return
299 /// an invalid type.
301
302 /// Return a new CompilerType that is the atomic type of this type. If this
303 /// type is not valid or the type system doesn't support atomic types, this
304 /// returns an invalid type.
306
307 /// Return a new CompilerType adds a restrict modifier to this type if this
308 /// type is valid and the type system supports restrict modifiers, else return
309 /// an invalid type.
311
312 /// Create a typedef to this type using "name" as the name of the typedef this
313 /// type is valid and the type system supports typedefs, else return an
314 /// invalid type.
315 /// \param payload The typesystem-specific \p lldb::Type payload.
316 CompilerType CreateTypedef(const char *name,
317 const CompilerDeclContext &decl_ctx,
318 uint32_t payload) const;
319
320 /// If the current object represents a typedef type, get the underlying type
322
323 /// Create related types using the current type's AST
325 /// \}
326
327 /// Exploring the type.
328 /// \{
329 struct IntegralTemplateArgument;
330
331 /// Return the size of the type in bytes.
332 std::optional<uint64_t> GetByteSize(ExecutionContextScope *exe_scope) const;
333 /// Return the size of the type in bits.
334 std::optional<uint64_t> GetBitSize(ExecutionContextScope *exe_scope) const;
335
336 lldb::Encoding GetEncoding(uint64_t &count) const;
337
338 lldb::Format GetFormat() const;
339
340 std::optional<size_t> GetTypeBitAlign(ExecutionContextScope *exe_scope) const;
341
342 uint32_t GetNumChildren(bool omit_empty_base_classes,
343 const ExecutionContext *exe_ctx) const;
344
346
348
349 /// If this type is an enumeration, iterate through all of its enumerators
350 /// using a callback. If the callback returns true, keep iterating, else abort
351 /// the iteration.
353 std::function<bool(const CompilerType &integer_type, ConstString name,
354 const llvm::APSInt &value)> const &callback) const;
355
356 uint32_t GetNumFields() const;
357
358 CompilerType GetFieldAtIndex(size_t idx, std::string &name,
359 uint64_t *bit_offset_ptr,
360 uint32_t *bitfield_bit_size_ptr,
361 bool *is_bitfield_ptr) const;
362
364
366
368 uint32_t *bit_offset_ptr) const;
369
371 uint32_t *bit_offset_ptr) const;
372
373 uint32_t GetIndexOfFieldWithName(const char *name,
374 CompilerType *field_compiler_type = nullptr,
375 uint64_t *bit_offset_ptr = nullptr,
376 uint32_t *bitfield_bit_size_ptr = nullptr,
377 bool *is_bitfield_ptr = nullptr) const;
378
380 ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers,
381 bool omit_empty_base_classes, bool ignore_array_bounds,
382 std::string &child_name, uint32_t &child_byte_size,
383 int32_t &child_byte_offset, uint32_t &child_bitfield_bit_size,
384 uint32_t &child_bitfield_bit_offset, bool &child_is_base_class,
385 bool &child_is_deref_of_parent, ValueObject *valobj,
386 uint64_t &language_flags) const;
387
388 /// Lookup a child given a name. This function will match base class names and
389 /// member member names in "clang_type" only, not descendants.
390 uint32_t GetIndexOfChildWithName(const char *name,
391 bool omit_empty_base_classes) const;
392
393 /// Lookup a child member given a name. This function will match member names
394 /// only and will descend into "clang_type" children in search for the first
395 /// member in this class, or any base class that matches "name".
396 /// TODO: Return all matches for a given name by returning a
397 /// vector<vector<uint32_t>>
398 /// so we catch all names that match a given child name, not just the first.
399 size_t
400 GetIndexOfChildMemberWithName(llvm::StringRef name,
401 bool omit_empty_base_classes,
402 std::vector<uint32_t> &child_indexes) const;
403
404 /// Return the number of template arguments the type has.
405 /// If expand_pack is true, then variadic argument packs are automatically
406 /// expanded to their supplied arguments. If it is false an argument pack
407 /// will only count as 1 argument.
408 size_t GetNumTemplateArguments(bool expand_pack = false) const;
409
410 // Return the TemplateArgumentKind of the template argument at index idx.
411 // If expand_pack is true, then variadic argument packs are automatically
412 // expanded to their supplied arguments. With expand_pack set to false, an
413 // arguement pack will count as 1 argument and return a type of Pack.
415 GetTemplateArgumentKind(size_t idx, bool expand_pack = false) const;
417 bool expand_pack = false) const;
418
419 /// Returns the value of the template argument and its type.
420 /// If expand_pack is true, then variadic argument packs are automatically
421 /// expanded to their supplied arguments. With expand_pack set to false, an
422 /// arguement pack will count as 1 argument and it is invalid to call this
423 /// method on the pack argument.
424 std::optional<IntegralTemplateArgument>
425 GetIntegralTemplateArgument(size_t idx, bool expand_pack = false) const;
426
428
430
432 /// \}
433
434 /// Dumping types.
435 /// \{
436#ifndef NDEBUG
437 /// Convenience LLVM-style dump method for use in the debugger only.
438 /// Don't call this function from actual code.
439 LLVM_DUMP_METHOD void dump() const;
440#endif
441
442 void DumpValue(ExecutionContext *exe_ctx, Stream *s, lldb::Format format,
443 const DataExtractor &data, lldb::offset_t data_offset,
444 size_t data_byte_size, uint32_t bitfield_bit_size,
445 uint32_t bitfield_bit_offset, bool show_types,
446 bool show_summary, bool verbose, uint32_t depth);
447
448 bool DumpTypeValue(Stream *s, lldb::Format format, const DataExtractor &data,
449 lldb::offset_t data_offset, size_t data_byte_size,
450 uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
451 ExecutionContextScope *exe_scope);
452
453 void DumpSummary(ExecutionContext *exe_ctx, Stream *s,
454 const DataExtractor &data, lldb::offset_t data_offset,
455 size_t data_byte_size);
456
457 /// Dump to stdout.
460
461 /// Print a description of the type to a stream. The exact implementation
462 /// varies, but the expectation is that eDescriptionLevelFull returns a
463 /// source-like representation of the type, whereas eDescriptionLevelVerbose
464 /// does a dump of the underlying AST if applicable.
467 /// \}
468
469 bool GetValueAsScalar(const DataExtractor &data, lldb::offset_t data_offset,
470 size_t data_byte_size, Scalar &value,
471 ExecutionContextScope *exe_scope) const;
472 void Clear() {
473 m_type_system = {};
474 m_type = nullptr;
475 }
476
477private:
478#ifndef NDEBUG
479 /// If the type is valid, ask the TypeSystem to verify the integrity
480 /// of the type to catch CompilerTypes that mix and match invalid
481 /// TypeSystem/Opaque type pairs.
482 bool Verify() const;
483#endif
484
485 lldb::TypeSystemWP m_type_system;
487};
488
489bool operator==(const CompilerType &lhs, const CompilerType &rhs);
490bool operator!=(const CompilerType &lhs, const CompilerType &rhs);
491
493 llvm::APSInt value;
495};
496
497} // namespace lldb_private
498
499#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...
size_t GetIndexOfChildMemberWithName(llvm::StringRef name, bool omit_empty_base_classes, std::vector< uint32_t > &child_indexes) const
Lookup a child member given a name.
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:234
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:485
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.
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:486
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
bool IsMemberFunctionPointerType() 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.
Definition: SBAttachInfo.h:14
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:86
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:83
LanguageType
Programming language type.
Encoding
Register encoding definitions.