LLDB mainline
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::CompilerType Class Reference

Generic representation of a type in a programming language. More...

#include <CompilerType.h>

Inheritance diagram for lldb_private::CompilerType:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::CompilerType:
Collaboration graph
[legend]

Classes

struct  IntegralTemplateArgument
 
class  TypeSystemSPWrapper
 This is a minimal wrapper of a TypeSystem shared pointer as returned by CompilerType which conventien dyn_cast support. More...
 

Public Member Functions

 CompilerType (lldb::TypeSystemWP type_system, lldb::opaque_compiler_type_t type)
 Creates a CompilerType with the given TypeSystem and opaque compiler type.
 
 CompilerType (TypeSystemSPWrapper type_system, lldb::opaque_compiler_type_t type)
 
 CompilerType (const CompilerType &rhs)
 
 CompilerType ()=default
 
bool IsForcefullyCompleted () const
 
bool GetValueAsScalar (const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, Scalar &value, ExecutionContextScope *exe_scope) const
 
void Clear ()
 
const CompilerTypeoperator= (const CompilerType &rhs)
 Operators.
 
bool operator< (const CompilerType &rhs) const
 
 operator bool () const
 Tests.
 
bool IsValid () const
 
bool IsArrayType (CompilerType *element_type=nullptr, uint64_t *size=nullptr, bool *is_incomplete=nullptr) const
 
bool IsVectorType (CompilerType *element_type=nullptr, uint64_t *size=nullptr) const
 
bool IsArrayOfScalarType () const
 
bool IsAggregateType () const
 
bool IsAnonymousType () const
 
bool IsScopedEnumerationType () const
 
bool IsBeingDefined () const
 
bool IsCharType () const
 
bool IsCompleteType () const
 
bool IsConst () const
 
bool IsCStringType (uint32_t &length) const
 
bool IsDefined () const
 
bool IsFloatingPointType (uint32_t &count, bool &is_complex) const
 
bool IsFunctionType () const
 
uint32_t IsHomogeneousAggregate (CompilerType *base_type_ptr) const
 
size_t GetNumberOfFunctionArguments () const
 
CompilerType GetFunctionArgumentAtIndex (const size_t index) const
 
bool IsVariadicFunctionType () const
 
bool IsFunctionPointerType () const
 
bool IsBlockPointerType (CompilerType *function_pointer_type_ptr=nullptr) const
 
bool IsIntegerType (bool &is_signed) const
 
bool IsEnumerationType (bool &is_signed) const
 
bool IsIntegerOrEnumerationType (bool &is_signed) const
 
bool IsPolymorphicClass () const
 
bool IsPossibleDynamicType (CompilerType *target_type, bool check_cplusplus, bool check_objc) const
 
bool IsPointerToScalarType () const
 
bool IsRuntimeGeneratedType () const
 
bool IsPointerType (CompilerType *pointee_type=nullptr) const
 
bool IsPointerOrReferenceType (CompilerType *pointee_type=nullptr) const
 
bool IsReferenceType (CompilerType *pointee_type=nullptr, bool *is_rvalue=nullptr) const
 
bool ShouldTreatScalarValueAsAddress () const
 
bool IsScalarType () const
 
bool IsTemplateType () const
 
bool IsTypedefType () const
 
bool IsVoidType () const
 
bool GetCompleteType () const
 Type Completion.
 
size_t GetPointerByteSize () const
 AST related queries.
 
TypeSystemSPWrapper GetTypeSystem () const
 Accessors.
 
ConstString GetTypeName (bool BaseOnly=false) const
 
ConstString GetDisplayTypeName () const
 
uint32_t GetTypeInfo (CompilerType *pointee_or_element_compiler_type=nullptr) const
 
lldb::LanguageType GetMinimumLanguage ()
 
lldb::opaque_compiler_type_t GetOpaqueQualType () const
 
lldb::TypeClass GetTypeClass () const
 
void SetCompilerType (lldb::TypeSystemWP type_system, lldb::opaque_compiler_type_t type)
 
void SetCompilerType (TypeSystemSPWrapper type_system, lldb::opaque_compiler_type_t type)
 
unsigned GetTypeQualifiers () const
 
CompilerType GetArrayElementType (ExecutionContextScope *exe_scope) const
 Creating related types.
 
CompilerType GetArrayType (uint64_t size) const
 
CompilerType GetCanonicalType () const
 
CompilerType GetFullyUnqualifiedType () const
 
CompilerType GetEnumerationIntegerType () 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 if there is a prototype.
 
CompilerType GetFunctionArgumentTypeAtIndex (size_t idx) const
 
CompilerType GetFunctionReturnType () const
 
size_t GetNumMemberFunctions () const
 
TypeMemberFunctionImpl GetMemberFunctionAtIndex (size_t idx)
 
CompilerType GetNonReferenceType () const
 If this type is a reference to a type (L value or R value reference), return a new type with the reference removed, else return the current type itself.
 
CompilerType GetPointeeType () const
 If this type is a pointer type, return the type that the pointer points to, else return an invalid type.
 
CompilerType GetPointerType () const
 Return a new CompilerType that is a pointer to this type.
 
CompilerType GetLValueReferenceType () const
 Return a new CompilerType that is a L value reference to this type if this type is valid and the type system supports L value references, else return an invalid type.
 
CompilerType GetRValueReferenceType () const
 Return a new CompilerType that is a R value reference to this type if this type is valid and the type system supports R value references, else return an invalid type.
 
CompilerType AddConstModifier () const
 Return a new CompilerType adds a const modifier to this type if this type is valid and the type system supports const modifiers, else return an invalid type.
 
CompilerType AddVolatileModifier () const
 Return a new CompilerType adds a volatile modifier to this type if this type is valid and the type system supports volatile modifiers, else return an invalid type.
 
CompilerType GetAtomicType () const
 Return a new CompilerType that is the atomic type of this type.
 
CompilerType AddRestrictModifier () const
 Return a new CompilerType adds a restrict modifier to this type if this type is valid and the type system supports restrict modifiers, else return an invalid type.
 
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 system supports typedefs, else return an invalid type.
 
CompilerType GetTypedefedType () const
 If the current object represents a typedef type, get the underlying type.
 
CompilerType GetBasicTypeFromAST (lldb::BasicType basic_type) const
 Create related types using the current type's AST.
 
LLVM_DUMP_METHOD void dump () const
 Dumping types.
 
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)
 
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)
 
void DumpSummary (ExecutionContext *exe_ctx, Stream *s, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size)
 
void DumpTypeDescription (lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) const
 Dump to stdout.
 
void DumpTypeDescription (Stream *s, lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) const
 Print a description of the type to a stream.
 

Private Member Functions

bool Verify () const
 If the type is valid, ask the TypeSystem to verify the integrity of the type to catch CompilerTypes that mix and match invalid TypeSystem/Opaque type pairs.
 

Private Attributes

lldb::TypeSystemWP m_type_system
 
lldb::opaque_compiler_type_t m_type = nullptr
 
std::optional< uint64_t > GetByteSize (ExecutionContextScope *exe_scope) const
 Return the size of the type in bytes.
 
std::optional< uint64_t > GetBitSize (ExecutionContextScope *exe_scope) const
 Return the size of the type in bits.
 
lldb::Encoding GetEncoding (uint64_t &count) const
 
lldb::Format GetFormat () const
 
std::optional< size_t > GetTypeBitAlign (ExecutionContextScope *exe_scope) const
 
uint32_t GetNumChildren (bool omit_empty_base_classes, const ExecutionContext *exe_ctx) const
 
lldb::BasicType GetBasicTypeEnumeration () const
 
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.
 
uint32_t GetNumFields () 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
 
uint32_t GetNumDirectBaseClasses () const
 
uint32_t GetNumVirtualBaseClasses () const
 
CompilerType GetDirectBaseClassAtIndex (size_t idx, uint32_t *bit_offset_ptr) const
 
CompilerType GetVirtualBaseClassAtIndex (size_t idx, uint32_t *bit_offset_ptr) const
 
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 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
 
uint32_t GetIndexOfChildWithName (const char *name, bool omit_empty_base_classes) const
 Lookup a child given a name.
 
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.
 
size_t GetNumTemplateArguments (bool expand_pack=false) const
 Return the number of template arguments the type has.
 
lldb::TemplateArgumentKind GetTemplateArgumentKind (size_t idx, bool expand_pack=false) const
 
CompilerType GetTypeTemplateArgument (size_t idx, bool expand_pack=false) const
 
std::optional< IntegralTemplateArgumentGetIntegralTemplateArgument (size_t idx, bool expand_pack=false) const
 Returns the value of the template argument and its type.
 
CompilerType GetTypeForFormatters () const
 
LazyBool ShouldPrintAsOneLiner (ValueObject *valobj) const
 
bool IsMeaninglessWithoutDynamicResolution () const
 
static lldb::BasicType GetBasicTypeEnumeration (ConstString name)
 

Detailed Description

Generic representation of a type in a programming language.

This class serves as an abstraction for a type inside one of the TypeSystems implemented by the language plugins. It does not have any actual logic in it but only stores an opaque pointer and a pointer to the TypeSystem that gives meaning to this opaque pointer. All methods of this class should call their respective method in the TypeSystem interface and pass the opaque pointer along.

See also
lldb_private::TypeSystem

Definition at line 36 of file CompilerType.h.

Constructor & Destructor Documentation

◆ CompilerType() [1/4]

lldb_private::CompilerType::CompilerType ( lldb::TypeSystemWP  type_system,
lldb::opaque_compiler_type_t  type 
)
inline

Creates a CompilerType with the given TypeSystem and opaque compiler type.

This constructor should only be called from the respective TypeSystem implementation.

See also
lldb_private::TypeSystemClang::GetType(clang::QualType)

Definition at line 44 of file CompilerType.h.

References Verify().

◆ CompilerType() [2/4]

lldb_private::CompilerType::CompilerType ( TypeSystemSPWrapper  type_system,
lldb::opaque_compiler_type_t  type 
)
inline

Definition at line 91 of file CompilerType.h.

References Verify().

◆ CompilerType() [3/4]

lldb_private::CompilerType::CompilerType ( const CompilerType rhs)
inline

Definition at line 96 of file CompilerType.h.

◆ CompilerType() [4/4]

lldb_private::CompilerType::CompilerType ( )
default

Member Function Documentation

◆ AddConstModifier()

CompilerType CompilerType::AddConstModifier ( ) const

Return a new CompilerType adds a const modifier to this type if this type is valid and the type system supports const modifiers, else return an invalid type.

Definition at line 503 of file CompilerType.cpp.

References AddConstModifier(), CompilerType(), GetTypeSystem(), IsValid(), and m_type.

Referenced by AddConstModifier(), PDBASTParser::CreateLLDBTypeFromPDBType(), and lldb_private::Type::ResolveCompilerType().

◆ AddRestrictModifier()

CompilerType CompilerType::AddRestrictModifier ( ) const

Return a new CompilerType adds a restrict modifier to this type if this type is valid and the type system supports restrict modifiers, else return an invalid type.

Definition at line 517 of file CompilerType.cpp.

References AddRestrictModifier(), CompilerType(), GetTypeSystem(), IsValid(), and m_type.

Referenced by AddRestrictModifier(), PDBASTParser::CreateLLDBTypeFromPDBType(), and lldb_private::Type::ResolveCompilerType().

◆ AddVolatileModifier()

CompilerType CompilerType::AddVolatileModifier ( ) const

Return a new CompilerType adds a volatile modifier to this type if this type is valid and the type system supports volatile modifiers, else return an invalid type.

Definition at line 510 of file CompilerType.cpp.

References AddVolatileModifier(), CompilerType(), GetTypeSystem(), IsValid(), and m_type.

Referenced by AddVolatileModifier(), PDBASTParser::CreateLLDBTypeFromPDBType(), and lldb_private::Type::ResolveCompilerType().

◆ Clear()

void lldb_private::CompilerType::Clear ( )
inline

◆ CreateTypedef()

CompilerType 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 system supports typedefs, else return an invalid type.

Parameters
payloadThe typesystem-specific lldb::Type payload.

Definition at line 524 of file CompilerType.cpp.

References CompilerType(), CreateTypedef(), GetTypeSystem(), IsValid(), and m_type.

Referenced by PDBASTParser::CreateLLDBTypeFromPDBType(), CreateTypedef(), lldb_private::npdb::PdbAstBuilder::GetOrCreateTypedefDecl(), and lldb_private::Type::ResolveCompilerType().

◆ dump()

LLVM_DUMP_METHOD void CompilerType::dump ( ) const

Dumping types.

Convenience LLVM-style dump method for use in the debugger only. Don't call this function from actual code.

Definition at line 870 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::TypeSystemClang::DumpFromSymbolFile().

◆ DumpSummary()

void CompilerType::DumpSummary ( ExecutionContext exe_ctx,
Stream s,
const DataExtractor data,
lldb::offset_t  data_offset,
size_t  data_byte_size 
)

Definition at line 846 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ DumpTypeDescription() [1/2]

void CompilerType::DumpTypeDescription ( lldb::DescriptionLevel  level = lldb::eDescriptionLevelFull) const

◆ DumpTypeDescription() [2/2]

void CompilerType::DumpTypeDescription ( Stream s,
lldb::DescriptionLevel  level = lldb::eDescriptionLevelFull 
) const

Print a description of the type to a stream.

The exact implementation varies, but the expectation is that eDescriptionLevelFull returns a source-like representation of the type, whereas eDescriptionLevelVerbose does a dump of the underlying AST if applicable.

Definition at line 862 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ DumpTypeValue()

bool CompilerType::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 
)

◆ DumpValue()

void CompilerType::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 
)

◆ ForEachEnumerator()

void CompilerType::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.

If the callback returns true, keep iterating, else abort the iteration.

Definition at line 604 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb::SBType::GetEnumMembers().

◆ GetArrayElementType()

CompilerType CompilerType::GetArrayElementType ( ExecutionContextScope exe_scope) const

◆ GetArrayType()

CompilerType CompilerType::GetArrayType ( uint64_t  size) const

◆ GetAtomicType()

CompilerType CompilerType::GetAtomicType ( ) const

Return a new CompilerType that is the atomic type of this type.

If this type is not valid or the type system doesn't support atomic types, this returns an invalid type.

Definition at line 496 of file CompilerType.cpp.

References CompilerType(), GetAtomicType(), GetTypeSystem(), IsValid(), and m_type.

Referenced by GetAtomicType(), and lldb_private::Type::ResolveCompilerType().

◆ GetBasicTypeEnumeration() [1/2]

lldb::BasicType CompilerType::GetBasicTypeEnumeration ( ) const

Definition at line 597 of file CompilerType.cpp.

References lldb::eBasicTypeInvalid, GetTypeSystem(), IsValid(), and m_type.

◆ GetBasicTypeEnumeration() [2/2]

static lldb::BasicType lldb_private::CompilerType::GetBasicTypeEnumeration ( ConstString  name)
static

◆ GetBasicTypeFromAST()

CompilerType CompilerType::GetBasicTypeFromAST ( lldb::BasicType  basic_type) const

◆ GetBitSize()

std::optional< uint64_t > CompilerType::GetBitSize ( ExecutionContextScope exe_scope) const

◆ GetByteSize()

std::optional< uint64_t > CompilerType::GetByteSize ( ExecutionContextScope exe_scope) const

Return the size of the type in bytes.

Definition at line 560 of file CompilerType.cpp.

References GetBitSize().

Referenced by CalculateNumChildren(), CommandObjectMemoryRead::DoExecute(), lldb_private::ClassDescriptorV2::iVarsStorage::fill(), lldb_private::TypeFormatImpl_Format::FormatObject(), lldb_private::ValueObjectMemory::GetByteSize(), lldb_private::ValueObjectVariable::GetByteSize(), lldb_private::Type::GetByteSize(), lldb_private::formatters::VectorTypeSyntheticFrontEnd::GetChildAtIndex(), lldb_private::TypeSystemClang::GetChildCompilerTypeAtIndex(), lldb_private::ValueObject::GetPointeeData(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), ABISysV_arc::GetReturnValueObjectSimple(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABIWindows_x86_64::GetReturnValueObjectSimple(), lldb_private::Thread::GetSiginfoValue(), lldb_private::ValueObject::GetSyntheticBase(), lldb_private::ValueObject::GetSyntheticChildAtOffset(), lldb_private::Value::GetValueAsData(), GetValueAsScalar(), LoadValueFromConsecutiveGPRRegisters(), IRForTarget::MaybeHandleVariable(), DWARFASTParserClang::ParseEnum(), DWARFASTParserClang::ParsePointerToMemberType(), lldb_private::ProcessStructReader::ProcessStructReader(), lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::Update(), and lldb_private::formatters::LibCxxUnorderedMapIteratorSyntheticFrontEnd::Update().

◆ GetCanonicalType()

CompilerType CompilerType::GetCanonicalType ( ) const

◆ GetChildCompilerTypeAtIndex()

CompilerType 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

◆ GetCompleteType()

bool CompilerType::GetCompleteType ( ) const

◆ GetDirectBaseClassAtIndex()

CompilerType CompilerType::GetDirectBaseClassAtIndex ( size_t  idx,
uint32_t bit_offset_ptr 
) const

◆ GetDisplayTypeName()

ConstString CompilerType::GetDisplayTypeName ( ) const

◆ GetEncoding()

lldb::Encoding CompilerType::GetEncoding ( uint64_t &  count) const

◆ GetEnumerationIntegerType()

CompilerType CompilerType::GetEnumerationIntegerType ( ) const

◆ GetFieldAtIndex()

CompilerType CompilerType::GetFieldAtIndex ( size_t  idx,
std::string &  name,
uint64_t *  bit_offset_ptr,
uint32_t bitfield_bit_size_ptr,
bool *  is_bitfield_ptr 
) const

◆ GetFormat()

lldb::Format CompilerType::GetFormat ( ) const

◆ GetFullyUnqualifiedType()

CompilerType CompilerType::GetFullyUnqualifiedType ( ) const

◆ GetFunctionArgumentAtIndex()

CompilerType CompilerType::GetFunctionArgumentAtIndex ( const size_t  index) const

◆ GetFunctionArgumentCount()

int CompilerType::GetFunctionArgumentCount ( ) const

Returns -1 if this isn't a function of if the function doesn't have a prototype Returns a value >= 0 if there is a prototype.

Definition at line 419 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::ClangFunctionCaller::CompileFunction().

◆ GetFunctionArgumentTypeAtIndex()

CompilerType CompilerType::GetFunctionArgumentTypeAtIndex ( size_t  idx) const

◆ GetFunctionReturnType()

CompilerType CompilerType::GetFunctionReturnType ( ) const

◆ GetIndexOfChildMemberWithName()

size_t CompilerType::GetIndexOfChildMemberWithName ( const char *  name,
bool  omit_empty_base_classes,
std::vector< uint32_t > &  child_indexes 
) const

Lookup a child member given a name.

This function will match member names only and will descend into "clang_type" children in search for the first member in this class, or any base class that matches "name". TODO: Return all matches for a given name by returning a vector<vector<uint32_t>> so we catch all names that match a given child name, not just the first.

Definition at line 736 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::ValueObject::GetChildMemberWithName(), and lldb_private::TypeSystemClang::GetIndexOfChildMemberWithName().

◆ GetIndexOfChildWithName()

uint32_t CompilerType::GetIndexOfChildWithName ( const char *  name,
bool  omit_empty_base_classes 
) const

Lookup a child given a name.

This function will match base class names and member member names in "clang_type" only, not descendants.

Definition at line 806 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), m_type, and UINT32_MAX.

Referenced by lldb_private::ValueObject::GetIndexOfChildWithName(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::GetIndexOfChildWithName(), and lldb_private::TypeSystemClang::GetIndexOfChildWithName().

◆ GetIndexOfFieldWithName()

uint32_t CompilerType::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

◆ GetIntegralTemplateArgument()

std::optional< CompilerType::IntegralTemplateArgument > CompilerType::GetIntegralTemplateArgument ( size_t  idx,
bool  expand_pack = false 
) const

Returns the value of the template argument and its type.

If expand_pack is true, then variadic argument packs are automatically expanded to their supplied arguments. With expand_pack set to false, an arguement pack will count as 1 argument and it is invalid to call this method on the pack argument.

Definition at line 773 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ GetLValueReferenceType()

CompilerType CompilerType::GetLValueReferenceType ( ) const

◆ GetMemberFunctionAtIndex()

TypeMemberFunctionImpl CompilerType::GetMemberFunctionAtIndex ( size_t  idx)

Definition at line 451 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ GetMinimumLanguage()

lldb::LanguageType CompilerType::GetMinimumLanguage ( )

◆ GetNonReferenceType()

CompilerType CompilerType::GetNonReferenceType ( ) const

If this type is a reference to a type (L value or R value reference), return a new type with the reference removed, else return the current type itself.

Definition at line 459 of file CompilerType.cpp.

References CompilerType(), GetNonReferenceType(), GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::TypeImpl::GetDereferencedType(), GetNonReferenceType(), and lldb_private::FormatManager::GetPossibleMatches().

◆ GetNumberOfFunctionArguments()

size_t CompilerType::GetNumberOfFunctionArguments ( ) const

◆ GetNumChildren()

uint32_t CompilerType::GetNumChildren ( bool  omit_empty_base_classes,
const ExecutionContext exe_ctx 
) const

◆ GetNumDirectBaseClasses()

uint32_t CompilerType::GetNumDirectBaseClasses ( ) const

◆ GetNumFields()

uint32_t CompilerType::GetNumFields ( ) const

◆ GetNumMemberFunctions()

size_t CompilerType::GetNumMemberFunctions ( ) const

Definition at line 443 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ GetNumTemplateArguments()

size_t CompilerType::GetNumTemplateArguments ( bool  expand_pack = false) const

Return the number of template arguments the type has.

If expand_pack is true, then variadic argument packs are automatically expanded to their supplied arguments. If it is false an argument pack will only count as 1 argument.

Definition at line 747 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::formatters::LibcxxStdSpanSyntheticFrontEndCreator(), and lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator().

◆ GetNumVirtualBaseClasses()

uint32_t CompilerType::GetNumVirtualBaseClasses ( ) const

Definition at line 638 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by PrivateAutoCompleteMembers().

◆ GetOpaqueQualType()

lldb::opaque_compiler_type_t lldb_private::CompilerType::GetOpaqueQualType ( ) const
inline

Definition at line 232 of file CompilerType.h.

References m_type.

Referenced by lldb_private::ClangExpressionDeclMap::AddContextClassType(), lldb_private::TypeSystemClang::AddEnumerationValueToEnumerationType(), lldb_private::npdb::UdtRecordCompleter::AddMethod(), lldb_private::ClangExpressionDeclMap::AddPersistentVariable(), PDBASTParser::AddRecordBases(), PDBASTParser::AddRecordMethod(), lldb_private::TypeSystemClang::AreTypesSame(), lldb_private::npdb::UdtRecordCompleter::complete(), DWARFASTParserClang::CompleteRecordType(), lldb_private::npdb::SymbolFileNativePDB::CompleteType(), lldb_private::ClangASTImporter::CompleteType(), SymbolFileDWARF::CompleteType(), DWARFASTParserClang::CompleteTypeFromDWARF(), PDBASTParser::CompleteTypeFromPDB(), PDBASTParser::CompleteTypeFromUDT(), lldb_private::npdb::PdbAstBuilder::CreateArrayType(), lldb_private::TypeSystemClang::CreateBlockPointerType(), lldb_private::npdb::PdbAstBuilder::CreateEnumType(), lldb_private::npdb::PdbAstBuilder::CreateFunctionDecl(), lldb_private::npdb::PdbAstBuilder::CreateFunctionType(), PDBASTParser::CreateLLDBTypeFromPDBType(), lldb_private::npdb::PdbAstBuilder::CreateRecordType(), lldb_private::ClangASTImporter::DeportType(), CommandObjectMemoryRead::DoExecute(), lldb_private::Type::Dump(), lldb_private::TypeSystemClang::DumpFromSymbolFile(), lldb_private::npdb::PdbAstBuilder::GetBasicType(), lldb_private::ClangASTSource::GetCompleteObjCInterface(), lldb_private::FormatManager::GetPossibleMatches(), lldb_private::ClangUtil::GetQualType(), lldb_private::ObjCLanguageRuntime::GetTypeBitSize(), SymbolFileDWARF::HasForwardDeclForClangType(), lldb_private::ClangUtil::IsClangType(), lldb_private::operator==(), DWARFASTParserClang::ParseInheritance(), DWARFASTParserClang::ParseStructureLikeDIE(), and DWARFASTParserClang::ParseSubroutine().

◆ GetPointeeType()

CompilerType CompilerType::GetPointeeType ( ) const

◆ GetPointerByteSize()

size_t CompilerType::GetPointerByteSize ( ) const

AST related queries.

Definition at line 316 of file CompilerType.cpp.

References GetTypeSystem().

Referenced by lldb_private::Value::GetValueAsData().

◆ GetPointerType()

CompilerType CompilerType::GetPointerType ( ) const

Return a new CompilerType that is a pointer to this type.

Definition at line 474 of file CompilerType.cpp.

References CompilerType(), GetPointerType(), GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::ClangExpressionDeclMap::AddContextClassType(), lldb_private::ClangExpressionDeclMap::AddOneGenericVariable(), lldb_private::ValueObject::AddressOf(), lldb_private::ValueObjectConstResultImpl::AddressOf(), lldb_private::Process::CallVoidArgVoidPtrReturn(), PDBASTParser::CreateLLDBTypeFromPDBType(), lldb_private::ValueObject::CreateValueObjectFromAddress(), CommandObjectMemoryRead::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), ExtractFields(), lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::GetChildAtIndex(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::GetClassInfoUtilityFunctionImpl(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::GetClassInfoUtilityFunctionImpl(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), GetPointerType(), lldb_private::TypeImpl::GetPointerType(), lldb_private::FormatManager::GetPossibleMatches(), lldb_private::ObjCLanguageRuntime::GetRuntimeType(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSiginfoType(), lldb_private::platform_linux::PlatformLinux::GetSiginfoType(), lldb_private::platform_netbsd::PlatformNetBSD::GetSiginfoType(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::StackFrame::GuessValueForAddress(), lldb_private::InferiorCallMmap(), lldb_private::PlatformWindows::MakeLoadImageUtilityFunction(), PlatformPOSIX::MakeLoadImageUtilityFunction(), IRForTarget::MaybeHandleVariable(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), ObjCExceptionRecognizedStackFrame::ObjCExceptionRecognizedStackFrame(), lldb_private::formatters::ObjCSELSummaryProvider(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(), lldb_private::Type::ResolveCompilerType(), lldb_private::AppleObjCTrampolineHandler::SetupDispatchFunction(), lldb_private::AppleGetItemInfoHandler::SetupGetItemInfoFunction(), lldb_private::AppleGetPendingItemsHandler::SetupGetPendingItemsFunction(), lldb_private::AppleGetQueuesHandler::SetupGetQueuesFunction(), lldb_private::AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction(), lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::Update(), and NSIndexPathSyntheticFrontEnd::Update().

◆ GetRValueReferenceType()

CompilerType CompilerType::GetRValueReferenceType ( ) const

Return a new CompilerType that is a R value reference to this type if this type is valid and the type system supports R value references, else return an invalid type.

Definition at line 489 of file CompilerType.cpp.

References CompilerType(), GetRValueReferenceType(), GetTypeSystem(), IsValid(), and m_type.

Referenced by PDBASTParser::CreateLLDBTypeFromPDBType(), lldb_private::FormatManager::GetPossibleMatches(), GetRValueReferenceType(), and lldb_private::Type::ResolveCompilerType().

◆ GetTemplateArgumentKind()

TemplateArgumentKind CompilerType::GetTemplateArgumentKind ( size_t  idx,
bool  expand_pack = false 
) const

Definition at line 756 of file CompilerType.cpp.

References lldb::eTemplateArgumentKindNull, GetTypeSystem(), IsValid(), and m_type.

◆ GetTypeBitAlign()

std::optional< size_t > CompilerType::GetTypeBitAlign ( ExecutionContextScope exe_scope) const

Definition at line 567 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by IRForTarget::MaybeHandleVariable().

◆ GetTypeClass()

lldb::TypeClass CompilerType::GetTypeClass ( ) const

◆ GetTypedefedType()

CompilerType CompilerType::GetTypedefedType ( ) const

◆ GetTypeForFormatters()

CompilerType CompilerType::GetTypeForFormatters ( ) const

◆ GetTypeInfo()

uint32_t CompilerType::GetTypeInfo ( CompilerType pointee_or_element_compiler_type = nullptr) const

Definition at line 337 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::ValueObject::CanProvideValue(), DerefToNSErrorPointer(), lldb_private::ValueObjectVariable::DoUpdateChildrenAddressType(), DumpValue(), ExtractFields(), lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), FlattenAggregateType(), lldb_private::TypeFormatImpl_Format::FormatObject(), lldb_private::ValueObject::GetExpressionPath(), lldb_private::ValueObjectPrinter::GetMostSpecializedValue(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_arc::GetReturnValueObjectSimple(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABIWindows_x86_64::GetReturnValueObjectSimple(), lldb_private::ValueObject::GetTypeInfo(), lldb_private::TypeSystemClang::GetTypeInfo(), lldb_private::ValueObject::GetValueForExpressionPath_Impl(), GetVTableAddress(), lldb_private::ValueObjectPrinter::IsInstancePointer(), lldb_private::ObjCLanguage::IsNilReference(), IsPointerValue(), lldb_private::formatters::NSArraySyntheticFrontEndCreator(), lldb_private::formatters::NSDictionarySyntheticFrontEndCreator(), lldb_private::formatters::NSSetSyntheticFrontEndCreator(), lldb_private::formatters::ObjCBOOLSummaryProvider(), ABIMacOSX_arm64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), and lldb_private::ValueObjectChild::UpdateValue().

◆ GetTypeName()

ConstString CompilerType::GetTypeName ( bool  BaseOnly = false) const

Definition at line 322 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by PDBASTParser::AddRecordBases(), PDBASTParser::AddRecordMembers(), PDBASTParser::AddRecordMethod(), lldb_private::ClangFunctionCaller::CompileFunction(), DWARFASTParserClang::CompleteRecordType(), lldb_private::ClangASTImporter::DeportType(), lldb_private::Type::GetBaseName(), lldb_private::AppleObjCRuntimeV2::GetByteOffsetForIvar(), lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::GetChildAtIndex(), lldb_private::TypeSystemClang::GetChildCompilerTypeAtIndex(), lldb_private::TypeMemberFunctionImpl::GetDescription(), lldb_private::TypeSystemClang::GetIndexOfChildWithName(), lldb_private::Type::GetName(), lldb_private::TypeImpl::GetName(), lldb_private::TypeAndOrName::GetName(), GetPDBBuiltinTypeName(), lldb_private::FormatManager::GetPossibleMatches(), lldb_private::Type::GetQualifiedName(), lldb_private::ValueObject::GetQualifiedTypeName(), lldb_private::ValueObjectChild::GetQualifiedTypeName(), lldb_private::ObjCLanguageRuntime::GetRuntimeType(), lldb_private::ValueObject::GetSyntheticBase(), lldb_private::ObjCLanguageRuntime::GetTypeBitSize(), lldb_private::ValueObject::GetTypeName(), lldb_private::ValueObjectChild::GetTypeName(), lldb_private::ValueObjectConstResult::GetTypeName(), lldb_private::ValueObjectMemory::GetTypeName(), lldb_private::ValueObjectRegister::GetTypeName(), lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator(), lldb_private::TypeAndOrName::SetCompilerType(), and lldb_private::TypeNameSpecifierImpl::TypeNameSpecifierImpl().

◆ GetTypeQualifiers()

unsigned CompilerType::GetTypeQualifiers ( ) const

Definition at line 372 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ GetTypeSystem()

CompilerType::TypeSystemSPWrapper CompilerType::GetTypeSystem ( ) const

Accessors.

Returns a shared pointer to the type system. The TypeSystem::TypeSystemSPWrapper can be compared for equality.

Definition at line 989 of file CompilerType.cpp.

References m_type_system.

Referenced by AddConstModifier(), lldb_private::TypeSystemClang::AddEnumerationValueToEnumerationType(), lldb_private::TypeSystemClang::AddFieldToRecordType(), lldb_private::NameSearchContext::AddFunDecl(), lldb_private::TypeSystemClang::AddMethodToObjCObjectType(), lldb_private::TypeSystemClang::AddObjCClassProperty(), AddRestrictModifier(), lldb_private::NameSearchContext::AddVarDecl(), lldb_private::TypeSystemClang::AddVariableToRecordType(), AddVolatileModifier(), lldb_private::TypeSystemClang::AreTypesSame(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::BlockPointerSyntheticFrontEnd(), lldb_private::TypeSystemClang::BuildIndirectFields(), lldb_private::ClangASTImporter::CanImport(), lldb_private::formatters::CMTimeSummaryProvider(), lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), lldb_private::npdb::SymbolFileNativePDB::CompleteType(), SymbolFileDWARF::CompleteType(), lldb_private::ClangASTImporter::CopyType(), lldb_private::TypeSystemClang::CreateMemberPointerType(), CreateTypedef(), lldb_private::ClangASTImporter::DeportType(), dump(), DumpSummary(), DumpTypeDescription(), lldb_private::TypeSystemClang::DumpTypeName(), DumpTypeValue(), DumpValue(), DWARFASTParserClang::ExtractIntFromFormValue(), ForcefullyCompleteType(), ForEachEnumerator(), GetArrayElementType(), GetArrayType(), GetAtomicType(), GetBasicTypeEnumeration(), GetBasicTypeFromAST(), GetBitSize(), GetCanonicalType(), GetChildCompilerTypeAtIndex(), GetCompleteType(), GetDirectBaseClassAtIndex(), GetDisplayTypeName(), GetEncoding(), GetEnumerationIntegerType(), lldb_private::Type::GetExeModule(), GetFieldAtIndex(), GetFormat(), GetFullyUnqualifiedType(), GetFunctionArgumentAtIndex(), GetFunctionArgumentCount(), GetFunctionArgumentTypeAtIndex(), GetFunctionReturnType(), GetIndexOfChildMemberWithName(), GetIndexOfChildWithName(), GetIntegralTemplateArgument(), GetLValueReferenceType(), GetMemberFunctionAtIndex(), GetMinimumLanguage(), GetNonReferenceType(), GetNumberOfFunctionArguments(), GetNumChildren(), GetNumDirectBaseClasses(), GetNumFields(), GetNumMemberFunctions(), GetNumTemplateArguments(), GetNumVirtualBaseClasses(), GetPointeeType(), GetPointerByteSize(), GetPointerType(), ABISysV_x86_64::GetReturnValueObjectImpl(), GetRValueReferenceType(), GetTemplateArgumentKind(), GetTypeBitAlign(), GetTypeClass(), GetTypedefedType(), GetTypeForFormatters(), GetTypeInfo(), GetTypeName(), GetTypeQualifiers(), lldb_private::TypeImpl::GetTypeSystem(), GetTypeTemplateArgument(), lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetValueOffset(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), GetVirtualBaseClassAtIndex(), lldb_private::ClangASTSource::GuardedCopyType(), SymbolFileDWARF::HasForwardDeclForClangType(), lldb_private::ClangASTImporter::Import(), IsAggregateType(), IsAnonymousType(), IsArrayType(), IsBeingDefined(), IsBlockPointerType(), IsCharType(), lldb_private::ClangUtil::IsClangType(), IsCompleteType(), IsConst(), IsCStringType(), IsDefined(), IsEnumerationType(), IsFloatingPointType(), IsForcefullyCompleted(), IsFunctionPointerType(), IsFunctionType(), IsHomogeneousAggregate(), IsIntegerType(), IsMeaninglessWithoutDynamicResolution(), lldb_private::TypeSystemClang::IsObjCObjectPointerType(), IsPointerOrReferenceType(), IsPointerType(), IsPolymorphicClass(), IsPossibleDynamicType(), IsReferenceType(), IsRuntimeGeneratedType(), IsScalarType(), IsScopedEnumerationType(), IsTemplateType(), IsTypedefType(), IsVectorType(), IsVoidType(), lldb_private::operator==(), DWARFASTParserClang::ParseChildMembers(), DWARFASTParserClang::ParseInheritance(), lldb_private::ClangUtil::RemoveFastQualifiers(), lldb_private::TypeSystemClang::RequireCompleteType(), lldb_private::TypeSystemClang::SetIsPacked(), lldb_private::TypeSystemClang::SetObjCSuperClass(), ShouldPrintAsOneLiner(), ShouldTreatScalarValueAsAddress(), lldb_private::formatters::VectorTypeSyntheticFrontEnd::Update(), lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::Update(), lldb_private::formatters::LibCxxUnorderedMapIteratorSyntheticFrontEnd::Update(), NSIndexPathSyntheticFrontEnd::Update(), and Verify().

◆ GetTypeTemplateArgument()

CompilerType CompilerType::GetTypeTemplateArgument ( size_t  idx,
bool  expand_pack = false 
) const

◆ GetValueAsScalar()

bool CompilerType::GetValueAsScalar ( const DataExtractor data,
lldb::offset_t  data_offset,
size_t  data_byte_size,
Scalar value,
ExecutionContextScope exe_scope 
) const

◆ GetVirtualBaseClassAtIndex()

CompilerType CompilerType::GetVirtualBaseClassAtIndex ( size_t  idx,
uint32_t bit_offset_ptr 
) const

◆ IsAggregateType()

bool CompilerType::IsAggregateType ( ) const

◆ IsAnonymousType()

bool CompilerType::IsAnonymousType ( ) const

◆ IsArrayOfScalarType()

bool CompilerType::IsArrayOfScalarType ( ) const

Definition at line 292 of file CompilerType.cpp.

References IsArrayType(), and IsScalarType().

◆ IsArrayType()

bool CompilerType::IsArrayType ( CompilerType element_type = nullptr,
uint64_t *  size = nullptr,
bool *  is_incomplete = nullptr 
) const

◆ IsBeingDefined()

bool CompilerType::IsBeingDefined ( ) const

Definition at line 299 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by DWARFASTParserClang::ParseSubroutine().

◆ IsBlockPointerType()

bool CompilerType::IsBlockPointerType ( CompilerType function_pointer_type_ptr = nullptr) const

◆ IsCharType()

bool CompilerType::IsCharType ( ) const

◆ IsCompleteType()

bool CompilerType::IsCompleteType ( ) const

◆ IsConst()

bool CompilerType::IsConst ( ) const

Definition at line 105 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ IsCStringType()

bool CompilerType::IsCStringType ( uint32_t length) const

Definition at line 112 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ IsDefined()

bool CompilerType::IsDefined ( ) const

◆ IsEnumerationType()

bool CompilerType::IsEnumerationType ( bool &  is_signed) const

Definition at line 172 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by IsIntegerOrEnumerationType().

◆ IsFloatingPointType()

bool CompilerType::IsFloatingPointType ( uint32_t count,
bool &  is_complex 
) const

◆ IsForcefullyCompleted()

bool CompilerType::IsForcefullyCompleted ( ) const

Definition at line 98 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb::SBType::IsTypeComplete().

◆ IsFunctionPointerType()

bool CompilerType::IsFunctionPointerType ( ) const

◆ IsFunctionType()

bool CompilerType::IsFunctionType ( ) const

Definition at line 119 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ IsHomogeneousAggregate()

uint32_t CompilerType::IsHomogeneousAggregate ( CompilerType base_type_ptr) const

◆ IsIntegerOrEnumerationType()

bool CompilerType::IsIntegerOrEnumerationType ( bool &  is_signed) const

◆ IsIntegerType()

bool CompilerType::IsIntegerType ( bool &  is_signed) const

◆ IsMeaninglessWithoutDynamicResolution()

bool CompilerType::IsMeaninglessWithoutDynamicResolution ( ) const

Definition at line 794 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::FormatManager::GetPossibleMatches().

◆ IsPointerOrReferenceType()

bool CompilerType::IsPointerOrReferenceType ( CompilerType pointee_type = nullptr) const

◆ IsPointerToScalarType()

bool CompilerType::IsPointerToScalarType ( ) const

Definition at line 285 of file CompilerType.cpp.

References GetPointeeType(), IsPointerType(), IsScalarType(), and IsValid().

◆ IsPointerType()

bool CompilerType::IsPointerType ( CompilerType pointee_type = nullptr) const

◆ IsPolymorphicClass()

bool CompilerType::IsPolymorphicClass ( ) const

Definition at line 239 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ IsPossibleDynamicType()

bool CompilerType::IsPossibleDynamicType ( CompilerType target_type,
bool  check_cplusplus,
bool  check_objc 
) const

◆ IsReferenceType()

bool CompilerType::IsReferenceType ( CompilerType pointee_type = nullptr,
bool *  is_rvalue = nullptr 
) const

Definition at line 203 of file CompilerType.cpp.

References Clear(), GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::FormatManager::GetPossibleMatches().

◆ IsRuntimeGeneratedType()

bool CompilerType::IsRuntimeGeneratedType ( ) const

Definition at line 77 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ IsScalarType()

bool CompilerType::IsScalarType ( ) const

◆ IsScopedEnumerationType()

bool CompilerType::IsScopedEnumerationType ( ) const

Definition at line 46 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

◆ IsTemplateType()

bool CompilerType::IsTemplateType ( ) const

Definition at line 264 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::Type::IsTemplateType().

◆ IsTypedefType()

bool CompilerType::IsTypedefType ( ) const

◆ IsValid()

bool lldb_private::CompilerType::IsValid ( ) const
inline

Definition at line 124 of file CompilerType.h.

Referenced by AddConstModifier(), lldb_private::ClangExpressionDeclMap::AddContextClassType(), lldb_private::TypeSystemClang::AddFieldToRecordType(), lldb_private::NameSearchContext::AddFunDecl(), lldb_private::TypeSystemClang::AddMethodToCXXRecordType(), lldb_private::TypeSystemClang::AddMethodToObjCObjectType(), lldb_private::TypeSystemClang::AddObjCClassProperty(), AddRestrictModifier(), lldb_private::NameSearchContext::AddVarDecl(), lldb_private::TypeSystemClang::AddVariableToRecordType(), AddVolatileModifier(), lldb_private::ValueObjectVariable::CalculateNumChildren(), lldb_private::ValueObject::CanProvideValue(), lldb_private::Watchpoint::CaptureWatchedValue(), lldb_private::formatters::CMTimeSummaryProvider(), lldb_private::TypeSystemClang::CreateArrayType(), PDBASTParser::CreateLLDBTypeFromPDBType(), lldb_private::TypeSystemClang::CreateMemberPointerType(), lldb_private::npdb::PdbAstBuilder::CreateRecordType(), lldb_private::ValueObjectSynthetic::CreateSynthFilter(), CreateTypedef(), CommandObjectMemoryRead::DoExecute(), dump(), lldb_private::Type::Dump(), DumpSummary(), DumpTypeDescription(), DumpTypeValue(), DumpValue(), lldb_private::AppleObjCDeclVendor::FinishDecl(), ForEachEnumerator(), lldb_private::TypeFormatImpl_EnumType::FormatObject(), GetArrayElementType(), GetArrayType(), GetAtomicType(), GetBasicTypeEnumeration(), GetBasicTypeFromAST(), GetBitSize(), lldb_private::ValueObjectVariable::GetByteSize(), GetCanonicalType(), lldb_private::TypeImpl::GetCanonicalType(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::GetChildAtIndex(), GetChildCompilerTypeAtIndex(), lldb_private::ObjCLanguageRuntime::GetClassDescriptor(), lldb_private::AppleObjCRuntimeV2::GetClassDescriptor(), lldb_private::Value::GetCompilerType(), lldb_private::TypeNameSpecifierImpl::GetCompilerType(), lldb_private::TypeImpl::GetCompilerType(), lldb_private::ValueObjectRegister::GetCompilerTypeImpl(), GetCompleteType(), lldb_private::TypeImpl::GetDereferencedType(), lldb_private::TypeImpl::GetDescription(), lldb_private::Type::GetDescription(), GetDirectBaseClassAtIndex(), lldb::SBType::GetDirectBaseClassAtIndex(), GetDisplayTypeName(), GetEncoding(), GetEnumerationIntegerType(), lldb::SBType::GetEnumMembers(), GetFieldAtIndex(), lldb::SBType::GetFieldAtIndex(), GetFormat(), GetFullyUnqualifiedType(), GetFunctionArgumentAtIndex(), GetFunctionArgumentCount(), GetFunctionArgumentTypeAtIndex(), lldb::SBType::GetFunctionReturnType(), GetFunctionReturnType(), GetIndexOfChildMemberWithName(), GetIndexOfChildWithName(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::GetIndexOfChildWithName(), GetIntegralTemplateArgument(), lldb_private::ThreadPlanAssemblyTracer::GetIntPointerType(), GetLValueReferenceType(), GetMemberFunctionAtIndex(), GetMinimumLanguage(), GetNonReferenceType(), GetNumberOfFunctionArguments(), GetNumChildren(), GetNumDirectBaseClasses(), GetNumFields(), GetNumMemberFunctions(), GetNumTemplateArguments(), GetNumVirtualBaseClasses(), GetPointeeType(), lldb_private::TypeImpl::GetPointeeType(), GetPointerType(), lldb_private::TypeImpl::GetPointerType(), lldb_private::FormatManager::GetPossibleMatches(), lldb_private::TypeImpl::GetReferenceType(), lldb_private::ABI::GetReturnValueObject(), GetRValueReferenceType(), lldb_private::Thread::GetSiginfoValue(), GetTemplateArgumentKind(), lldb::SBType::GetTemplateArgumentType(), lldb::SBTypeNameSpecifier::GetType(), GetTypeBitAlign(), GetTypeClass(), GetTypedefedType(), lldb_private::TypeImpl::GetTypedefedType(), GetTypeForFormatters(), GetTypeInfo(), GetTypeName(), GetTypeQualifiers(), lldb_private::TypeImpl::GetTypeSystem(), GetTypeTemplateArgument(), lldb_private::TypeImpl::GetUnqualifiedType(), lldb_private::Value::GetValueAsData(), GetValueAsScalar(), lldb_private::Value::GetValueDefaultFormat(), lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetValueOffset(), GetVirtualBaseClassAtIndex(), lldb::SBType::GetVirtualBaseClassAtIndex(), lldb_private::TypeAndOrName::HasCompilerType(), IsAggregateType(), IsAnonymousType(), IsArrayType(), IsBeingDefined(), IsBlockPointerType(), IsCharType(), IsCompleteType(), IsConst(), lldb_private::TypeSystemClang::IsCStringType(), IsCStringType(), IsDefined(), IsEnumerationType(), IsFloatingPointType(), IsForcefullyCompleted(), IsFunctionPointerType(), IsFunctionType(), IsHomogeneousAggregate(), IsIntegerType(), IsMeaninglessWithoutDynamicResolution(), IsPointerOrReferenceType(), IsPointerToScalarType(), IsPointerType(), IsPolymorphicClass(), IsPossibleDynamicType(), IsReferenceType(), IsRuntimeGeneratedType(), IsScalarType(), IsScopedEnumerationType(), IsTemplateType(), IsTypedefType(), lldb_private::TypeMemberFunctionImpl::IsValid(), lldb_private::TypeImpl::IsValid(), lldb_private::Language::ImageListTypeScavenger::Result::IsValid(), IsVectorType(), IsVoidType(), lldb_private::formatters::LibcxxStdRangesRefViewSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdSpanSyntheticFrontEndCreator(), lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::ValueObject::MaybeCalculateCompleteType(), lldb_private::ValueObjectPrinter::PrintDecl(), lldb_private::ValueObjectPrinter::PrintValueAndSummaryIfNeeded(), PrivateAutoComplete(), lldb_private::Type::ResolveCompilerType(), lldb_private::Value::ResolveValue(), lldb_private::TypeSystemClang::SetObjCSuperClass(), lldb_private::ThreadPlanCallFunction::SetReturnValue(), lldb_private::FormatManager::ShouldPrintAsOneLiner(), ShouldPrintAsOneLiner(), ShouldTreatScalarValueAsAddress(), lldb_private::TypeNameSpecifierImpl::TypeNameSpecifierImpl(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectMemory::ValueObjectMemory(), Verify(), and lldb_private::Watchpoint::Watchpoint().

◆ IsVariadicFunctionType()

bool lldb_private::CompilerType::IsVariadicFunctionType ( ) const

◆ IsVectorType()

bool CompilerType::IsVectorType ( CompilerType element_type = nullptr,
uint64_t *  size = nullptr 
) const

◆ IsVoidType()

bool CompilerType::IsVoidType ( ) const

◆ operator bool()

lldb_private::CompilerType::operator bool ( ) const
inlineexplicit

Tests.

Definition at line 120 of file CompilerType.h.

References m_type, and m_type_system.

◆ operator<()

bool lldb_private::CompilerType::operator< ( const CompilerType rhs) const
inline

Definition at line 109 of file CompilerType.h.

References m_type, and m_type_system.

◆ operator=()

const CompilerType & lldb_private::CompilerType::operator= ( const CompilerType rhs)
inline

Operators.

Definition at line 103 of file CompilerType.h.

References m_type, and m_type_system.

Referenced by lldb_private::TaggedASTType< C >::operator=().

◆ SetCompilerType() [1/2]

void CompilerType::SetCompilerType ( lldb::TypeSystemWP  type_system,
lldb::opaque_compiler_type_t  type 
)

◆ SetCompilerType() [2/2]

void CompilerType::SetCompilerType ( CompilerType::TypeSystemSPWrapper  type_system,
lldb::opaque_compiler_type_t  type 
)

◆ ShouldPrintAsOneLiner()

LazyBool CompilerType::ShouldPrintAsOneLiner ( ValueObject valobj) const

◆ ShouldTreatScalarValueAsAddress()

bool CompilerType::ShouldTreatScalarValueAsAddress ( ) const

Definition at line 214 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by lldb_private::ValueObjectChild::UpdateValue().

◆ Verify()

bool CompilerType::Verify ( ) const
private

If the type is valid, ask the TypeSystem to verify the integrity of the type to catch CompilerTypes that mix and match invalid TypeSystem/Opaque type pairs.

Definition at line 980 of file CompilerType.cpp.

References GetTypeSystem(), IsValid(), and m_type.

Referenced by CompilerType().

Member Data Documentation

◆ m_type

lldb::opaque_compiler_type_t lldb_private::CompilerType::m_type = nullptr
private

Definition at line 483 of file CompilerType.h.

Referenced by AddConstModifier(), AddRestrictModifier(), AddVolatileModifier(), Clear(), CreateTypedef(), dump(), DumpSummary(), DumpTypeDescription(), DumpTypeValue(), DumpValue(), ForEachEnumerator(), GetArrayElementType(), GetArrayType(), GetAtomicType(), GetBasicTypeEnumeration(), GetBitSize(), GetCanonicalType(), GetChildCompilerTypeAtIndex(), GetCompleteType(), GetDirectBaseClassAtIndex(), GetDisplayTypeName(), GetEncoding(), GetEnumerationIntegerType(), GetFieldAtIndex(), GetFormat(), GetFullyUnqualifiedType(), GetFunctionArgumentAtIndex(), GetFunctionArgumentCount(), GetFunctionArgumentTypeAtIndex(), GetFunctionReturnType(), GetIndexOfChildMemberWithName(), GetIndexOfChildWithName(), GetIntegralTemplateArgument(), GetLValueReferenceType(), GetMemberFunctionAtIndex(), GetMinimumLanguage(), GetNonReferenceType(), GetNumberOfFunctionArguments(), GetNumChildren(), GetNumDirectBaseClasses(), GetNumFields(), GetNumMemberFunctions(), GetNumTemplateArguments(), GetNumVirtualBaseClasses(), GetOpaqueQualType(), GetPointeeType(), GetPointerType(), GetRValueReferenceType(), GetTemplateArgumentKind(), GetTypeBitAlign(), GetTypeClass(), GetTypedefedType(), GetTypeForFormatters(), GetTypeInfo(), GetTypeName(), GetTypeQualifiers(), GetTypeTemplateArgument(), GetVirtualBaseClassAtIndex(), IsAggregateType(), IsAnonymousType(), IsArrayType(), IsBeingDefined(), IsBlockPointerType(), IsCharType(), IsCompleteType(), IsConst(), IsCStringType(), IsDefined(), IsEnumerationType(), IsFloatingPointType(), IsForcefullyCompleted(), IsFunctionPointerType(), IsFunctionType(), IsHomogeneousAggregate(), IsIntegerType(), IsMeaninglessWithoutDynamicResolution(), IsPointerOrReferenceType(), IsPointerType(), IsPolymorphicClass(), IsPossibleDynamicType(), IsReferenceType(), IsRuntimeGeneratedType(), IsScalarType(), IsScopedEnumerationType(), IsTemplateType(), IsTypedefType(), IsVectorType(), IsVoidType(), operator bool(), operator<(), operator=(), SetCompilerType(), ShouldPrintAsOneLiner(), ShouldTreatScalarValueAsAddress(), and Verify().

◆ m_type_system

lldb::TypeSystemWP lldb_private::CompilerType::m_type_system
private

The documentation for this class was generated from the following files: