LLDB mainline
lldb_private::TypeSystemClang Class Reference

A TypeSystem implementation based on Clang. More...

#include <TypeSystemClang.h>

Inheritance diagram for lldb_private::TypeSystemClang:
[legend]

Classes

class  TemplateParameterInfos

Public Types

typedef void(* CompleteTagDeclCallback) (void *baton, clang::TagDecl *)
typedef void(* CompleteObjCInterfaceDeclCallback) (void *baton, clang::ObjCInterfaceDecl *)

Public Member Functions

bool isA (const void *ClassID) const override
 TypeSystemClang (llvm::StringRef name, llvm::Triple triple)
 Constructs a TypeSystemClang with an ASTContext using the given triple.
 TypeSystemClang (llvm::StringRef name, clang::ASTContext &existing_ctxt)
 Constructs a TypeSystemClang that uses an existing ASTContext internally.
 ~TypeSystemClang () override
void Finalize () override
 Free up any resources associated with this TypeSystem.
llvm::StringRef GetPluginName () override
llvm::StringRef getDisplayName () const
 Returns the display name of this TypeSystemClang that indicates what purpose it serves in LLDB.
clang::ASTContext & getASTContext () const
 Returns the clang::ASTContext instance managed by this TypeSystemClang.
clang::MangleContext * getMangleContext ()
std::shared_ptr< clang::TargetOptions > & getTargetOptions ()
clang::TargetInfo * getTargetInfo ()
void setSema (clang::Sema *s)
clang::Sema * getSema ()
const char * GetTargetTriple ()
void SetExternalSource (llvm::IntrusiveRefCntPtr< clang::ExternalASTSource > ast_source_sp)
bool GetCompleteDecl (clang::Decl *decl)
void SetMetadataAsUserID (const clang::Decl *decl, lldb::user_id_t user_id)
void SetMetadataAsUserID (const clang::Type *type, lldb::user_id_t user_id)
void SetMetadata (const clang::Decl *object, ClangASTMetadata meta_data)
void SetMetadata (const clang::Type *object, ClangASTMetadata meta_data)
std::optional< ClangASTMetadataGetMetadata (const clang::Decl *object)
std::optional< ClangASTMetadataGetMetadata (const clang::Type *object)
void SetCXXRecordDeclAccess (const clang::CXXRecordDecl *object, clang::AccessSpecifier access)
clang::AccessSpecifier GetCXXRecordDeclAccess (const clang::CXXRecordDecl *object)
CompilerType GetBuiltinTypeForEncodingAndBitSize (lldb::Encoding encoding, size_t bit_size) override
CompilerType GetBasicType (lldb::BasicType type)
CompilerType GetBuiltinTypeForDWARFEncodingAndBitSize (llvm::StringRef type_name, uint32_t dw_ate, uint32_t bit_size)
CompilerType GetCStringType (bool is_const)
CompilerDeclContext GetCompilerDeclContextForType (const CompilerType &type) override
 Returns the direct parent context of specified type.
uint32_t GetPointerByteSize () override
clang::TranslationUnitDecl * GetTranslationUnitDecl ()
CompilerType GetType (clang::QualType qt)
 Creates a CompilerType from the given QualType with the current TypeSystemClang instance as the CompilerType's typesystem.
CompilerType GetTypeForDecl (clang::NamedDecl *decl)
CompilerType GetTypeForDecl (clang::TagDecl *decl)
CompilerType GetTypeForDecl (clang::ObjCInterfaceDecl *objc_decl)
CompilerType GetTypeForDecl (clang::ValueDecl *value_decl)
template<typename RecordDeclType>
CompilerType GetTypeForIdentifier (const clang::ASTContext &Ctx, llvm::StringRef type_name, clang::DeclContext *decl_context=nullptr)
CompilerType CreateStructForIdentifier (llvm::StringRef type_name, const std::initializer_list< std::pair< const char *, CompilerType > > &type_fields, bool packed=false)
CompilerType GetOrCreateStructForIdentifier (llvm::StringRef type_name, const std::initializer_list< std::pair< const char *, CompilerType > > &type_fields, bool packed=false)
uint32_t GetNumBaseClasses (const clang::CXXRecordDecl *cxx_record_decl, bool omit_empty_base_classes)
uint32_t GetIndexForRecordChild (const clang::RecordDecl *record_decl, clang::NamedDecl *canonical_decl, bool omit_empty_base_classes)
uint32_t GetIndexForRecordBase (const clang::RecordDecl *record_decl, const clang::CXXBaseSpecifier *base_spec, bool omit_empty_base_classes)
OptionalClangModuleID GetOrCreateClangModule (llvm::StringRef name, OptionalClangModuleID parent, bool is_framework=false, bool is_explicit=false)
 Synthesize a clang::Module and return its ID or a default-constructed ID.
CompilerType CreateRecordType (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, lldb::AccessType access_type, llvm::StringRef name, int kind, lldb::LanguageType language, std::optional< ClangASTMetadata > metadata=std::nullopt, bool exports_symbols=false)
clang::FunctionTemplateDecl * CreateFunctionTemplateDecl (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, clang::FunctionDecl *func_decl, const TemplateParameterInfos &infos)
void CreateFunctionTemplateSpecializationInfo (clang::FunctionDecl *func_decl, clang::FunctionTemplateDecl *Template, const TemplateParameterInfos &infos)
clang::ClassTemplateDecl * CreateClassTemplateDecl (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, lldb::AccessType access_type, llvm::StringRef class_name, int kind, const TemplateParameterInfos &infos)
clang::TemplateTemplateParmDecl * CreateTemplateTemplateParmDecl (const char *template_name)
clang::ClassTemplateSpecializationDecl * CreateClassTemplateSpecializationDecl (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, clang::ClassTemplateDecl *class_template_decl, int kind, const TemplateParameterInfos &infos)
CompilerType CreateClassTemplateSpecializationType (clang::ClassTemplateSpecializationDecl *class_template_specialization_decl)
bool FieldIsBitfield (clang::FieldDecl *field, uint32_t &bitfield_bit_size)
bool RecordHasFields (const clang::RecordDecl *record_decl)
bool BaseSpecifierIsEmpty (const clang::CXXBaseSpecifier *b)
CompilerType CreateObjCClass (llvm::StringRef name, clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, bool isInternal, std::optional< ClangASTMetadata > metadata=std::nullopt)
clang::NamespaceDecl * GetUniqueNamespaceDeclaration (const char *name, clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, bool is_inline=false)
clang::FunctionDecl * CreateFunctionDeclaration (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, llvm::StringRef name, const CompilerType &function_Type, clang::StorageClass storage, bool is_inline, llvm::StringRef asm_label)
CompilerType CreateFunctionType (const CompilerType &result_type, llvm::ArrayRef< CompilerType > args, bool is_variadic, unsigned type_quals, clang::CallingConv cc=clang::CC_C, clang::RefQualifierKind ref_qual=clang::RQ_None)
clang::ParmVarDecl * CreateParameterDeclaration (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, const char *name, const CompilerType &param_type, int storage, bool add_decl=false)
CompilerType CreateBlockPointerType (const CompilerType &function_type)
CompilerType CreateArrayType (const CompilerType &element_type, std::optional< size_t > element_count, bool is_vector)
CompilerType CreateEnumerationType (llvm::StringRef name, clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, const Declaration &decl, const CompilerType &integer_qual_type, bool is_scoped, std::optional< clang::EnumExtensibilityAttr::Kind > enum_kind=std::nullopt)
CompilerType GetIntTypeFromBitSize (size_t bit_size, bool is_signed)
CompilerType GetPointerSizedIntType (bool is_signed)
plugin::dwarf::DWARFASTParserGetDWARFParser () override
PDBASTParserGetPDBParser () override
npdb::PdbAstBuilderGetNativePDBParser () override
void CompleteTagDecl (clang::TagDecl *)
void CompleteObjCInterfaceDecl (clang::ObjCInterfaceDecl *)
bool LayoutRecordType (const clang::RecordDecl *record_decl, uint64_t &size, uint64_t &alignment, llvm::DenseMap< const clang::FieldDecl *, uint64_t > &field_offsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &base_offsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &vbase_offsets)
CompilerDecl GetCompilerDecl (clang::Decl *decl)
 Creates a CompilerDecl from the given Decl with the current TypeSystemClang instance as its typesystem.
ConstString DeclGetName (void *opaque_decl) override
ConstString DeclGetMangledName (void *opaque_decl) override
CompilerDeclContext DeclGetDeclContext (void *opaque_decl) override
CompilerType DeclGetFunctionReturnType (void *opaque_decl) override
size_t DeclGetFunctionNumArguments (void *opaque_decl) override
CompilerType DeclGetFunctionArgumentType (void *opaque_decl, size_t arg_idx) override
std::vector< lldb_private::CompilerContextDeclGetCompilerContext (void *opaque_decl) override
Scalar DeclGetConstantValue (void *opaque_decl) override
CompilerType GetTypeForDecl (void *opaque_decl) override
CompilerDeclContext CreateDeclContext (clang::DeclContext *ctx)
 Creates a CompilerDeclContext from the given DeclContext with the current TypeSystemClang instance as its typesystem.
std::vector< CompilerDeclDeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name, const bool ignore_using_decls) override
ConstString DeclContextGetName (void *opaque_decl_ctx) override
ConstString DeclContextGetScopeQualifiedName (void *opaque_decl_ctx) override
bool DeclContextIsClassMethod (void *opaque_decl_ctx) override
bool DeclContextIsContainedInLookup (void *opaque_decl_ctx, void *other_opaque_decl_ctx) override
lldb::LanguageType DeclContextGetLanguage (void *opaque_decl_ctx) override
std::vector< lldb_private::CompilerContextDeclContextGetCompilerContext (void *opaque_decl_ctx) override
bool Verify (lldb::opaque_compiler_type_t type) override
 Verify the integrity of the type to catch CompilerTypes that mix and match invalid TypeSystem/Opaque type pairs.
bool IsArrayType (lldb::opaque_compiler_type_t type, CompilerType *element_type, uint64_t *size, bool *is_incomplete) override
bool IsVectorType (lldb::opaque_compiler_type_t type, CompilerType *element_type, uint64_t *size) override
bool IsAggregateType (lldb::opaque_compiler_type_t type) override
bool IsAnonymousType (lldb::opaque_compiler_type_t type) override
bool IsBeingDefined (lldb::opaque_compiler_type_t type) override
bool IsCharType (lldb::opaque_compiler_type_t type) override
bool IsCompleteType (lldb::opaque_compiler_type_t type) override
bool IsConst (lldb::opaque_compiler_type_t type) override
bool IsCStringType (lldb::opaque_compiler_type_t type, uint32_t &length)
bool IsDefined (lldb::opaque_compiler_type_t type) override
bool IsFloatingPointType (lldb::opaque_compiler_type_t type, uint32_t &count, bool &is_complex) override
unsigned GetPtrAuthKey (lldb::opaque_compiler_type_t type) override
unsigned GetPtrAuthDiscriminator (lldb::opaque_compiler_type_t type) override
bool GetPtrAuthAddressDiversity (lldb::opaque_compiler_type_t type) override
bool IsFunctionType (lldb::opaque_compiler_type_t type) override
uint32_t IsHomogeneousAggregate (lldb::opaque_compiler_type_t type, CompilerType *base_type_ptr) override
size_t GetNumberOfFunctionArguments (lldb::opaque_compiler_type_t type) override
CompilerType GetFunctionArgumentAtIndex (lldb::opaque_compiler_type_t type, const size_t index) override
bool IsFunctionPointerType (lldb::opaque_compiler_type_t type) override
bool IsMemberFunctionPointerType (lldb::opaque_compiler_type_t type) override
bool IsBlockPointerType (lldb::opaque_compiler_type_t type, CompilerType *function_pointer_type_ptr) override
bool IsIntegerType (lldb::opaque_compiler_type_t type, bool &is_signed) override
bool IsEnumerationType (lldb::opaque_compiler_type_t type, bool &is_signed) override
bool IsScopedEnumerationType (lldb::opaque_compiler_type_t type) override
bool IsPolymorphicClass (lldb::opaque_compiler_type_t type) override
bool IsPossibleDynamicType (lldb::opaque_compiler_type_t type, CompilerType *target_type, bool check_cplusplus, bool check_objc) override
bool IsRuntimeGeneratedType (lldb::opaque_compiler_type_t type) override
 This is used by swift.
bool IsPointerType (lldb::opaque_compiler_type_t type, CompilerType *pointee_type) override
bool IsPointerOrReferenceType (lldb::opaque_compiler_type_t type, CompilerType *pointee_type) override
bool IsReferenceType (lldb::opaque_compiler_type_t type, CompilerType *pointee_type, bool *is_rvalue) override
bool IsScalarType (lldb::opaque_compiler_type_t type) override
bool IsTypedefType (lldb::opaque_compiler_type_t type) override
bool IsVoidType (lldb::opaque_compiler_type_t type) override
bool CanPassInRegisters (const CompilerType &type) override
bool SupportsLanguage (lldb::LanguageType language) override
bool GetCompleteType (lldb::opaque_compiler_type_t type) override
bool IsForcefullyCompleted (lldb::opaque_compiler_type_t type) override
ConstString GetTypeName (lldb::opaque_compiler_type_t type, bool base_only) override
ConstString GetDisplayTypeName (lldb::opaque_compiler_type_t type) override
uint32_t GetTypeInfo (lldb::opaque_compiler_type_t type, CompilerType *pointee_or_element_compiler_type) override
lldb::LanguageType GetMinimumLanguage (lldb::opaque_compiler_type_t type) override
lldb::TypeClass GetTypeClass (lldb::opaque_compiler_type_t type) override
unsigned GetTypeQualifiers (lldb::opaque_compiler_type_t type) override
CompilerType GetArrayElementType (lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) override
CompilerType GetArrayType (lldb::opaque_compiler_type_t type, uint64_t size) override
CompilerType GetCanonicalType (lldb::opaque_compiler_type_t type) override
CompilerType GetFullyUnqualifiedType (lldb::opaque_compiler_type_t type) override
CompilerType GetEnumerationIntegerType (lldb::opaque_compiler_type_t type) override
int GetFunctionArgumentCount (lldb::opaque_compiler_type_t type) override
CompilerType GetFunctionArgumentTypeAtIndex (lldb::opaque_compiler_type_t type, size_t idx) override
CompilerType GetFunctionReturnType (lldb::opaque_compiler_type_t type) override
size_t GetNumMemberFunctions (lldb::opaque_compiler_type_t type) override
TypeMemberFunctionImpl GetMemberFunctionAtIndex (lldb::opaque_compiler_type_t type, size_t idx) override
CompilerType GetNonReferenceType (lldb::opaque_compiler_type_t type) override
CompilerType GetPointeeType (lldb::opaque_compiler_type_t type) override
CompilerType GetPointerType (lldb::opaque_compiler_type_t type) override
CompilerType GetLValueReferenceType (lldb::opaque_compiler_type_t type) override
CompilerType GetRValueReferenceType (lldb::opaque_compiler_type_t type) override
CompilerType GetAtomicType (lldb::opaque_compiler_type_t type) override
CompilerType AddConstModifier (lldb::opaque_compiler_type_t type) override
CompilerType AddPtrAuthModifier (lldb::opaque_compiler_type_t type, uint32_t payload) override
CompilerType AddVolatileModifier (lldb::opaque_compiler_type_t type) override
CompilerType AddRestrictModifier (lldb::opaque_compiler_type_t type) override
CompilerType CreateTypedef (lldb::opaque_compiler_type_t type, const char *name, const CompilerDeclContext &decl_ctx, uint32_t opaque_payload) override
 Using the current type, create a new typedef to that type using "typedef_name" as the name and "decl_ctx" as the decl context.
CompilerType GetTypedefedType (lldb::opaque_compiler_type_t type) override
CompilerType GetBasicTypeFromAST (lldb::BasicType basic_type) override
CompilerType CreateGenericFunctionPrototype () override
const llvm::fltSemantics & GetFloatTypeSemantics (size_t byte_size, lldb::Format format) override
llvm::Expected< uint64_t > GetByteSize (lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope)
llvm::Expected< uint64_t > GetBitSize (lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) override
lldb::Encoding GetEncoding (lldb::opaque_compiler_type_t type, uint64_t &count) override
lldb::Format GetFormat (lldb::opaque_compiler_type_t type) override
std::optional< size_t > GetTypeBitAlign (lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) override
llvm::Expected< uint32_t > GetNumChildren (lldb::opaque_compiler_type_t type, bool omit_empty_base_classes, const ExecutionContext *exe_ctx) override
CompilerType GetBuiltinTypeByName (ConstString name) override
lldb::BasicType GetBasicTypeEnumeration (lldb::opaque_compiler_type_t type) override
void ForEachEnumerator (lldb::opaque_compiler_type_t type, std::function< bool(const CompilerType &integer_type, ConstString name, const llvm::APSInt &value)> const &callback) override
uint32_t GetNumFields (lldb::opaque_compiler_type_t type) override
CompilerType GetFieldAtIndex (lldb::opaque_compiler_type_t type, size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) override
uint32_t GetNumDirectBaseClasses (lldb::opaque_compiler_type_t type) override
uint32_t GetNumVirtualBaseClasses (lldb::opaque_compiler_type_t type) override
CompilerType GetDirectBaseClassAtIndex (lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) override
CompilerType GetVirtualBaseClassAtIndex (lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) override
CompilerDecl GetStaticFieldWithName (lldb::opaque_compiler_type_t type, llvm::StringRef name) override
llvm::Expected< CompilerTypeGetDereferencedType (lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, std::string &deref_name, uint32_t &deref_byte_size, int32_t &deref_byte_offset, ValueObject *valobj, uint64_t &language_flags) override
llvm::Expected< CompilerTypeGetChildCompilerTypeAtIndex (lldb::opaque_compiler_type_t type, 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) override
llvm::Expected< uint32_t > GetIndexOfChildWithName (lldb::opaque_compiler_type_t type, llvm::StringRef name, bool omit_empty_base_classes) override
size_t GetIndexOfChildMemberWithName (lldb::opaque_compiler_type_t type, llvm::StringRef name, bool omit_empty_base_classes, std::vector< uint32_t > &child_indexes) override
CompilerType GetDirectNestedTypeWithName (lldb::opaque_compiler_type_t type, llvm::StringRef name) override
bool IsTemplateType (lldb::opaque_compiler_type_t type) override
size_t GetNumTemplateArguments (lldb::opaque_compiler_type_t type, bool expand_pack) override
lldb::TemplateArgumentKind GetTemplateArgumentKind (lldb::opaque_compiler_type_t type, size_t idx, bool expand_pack) override
CompilerType GetTypeTemplateArgument (lldb::opaque_compiler_type_t type, size_t idx, bool expand_pack) override
std::optional< CompilerType::IntegralTemplateArgumentGetIntegralTemplateArgument (lldb::opaque_compiler_type_t type, size_t idx, bool expand_pack) override
CompilerType GetTypeForFormatters (void *type) override
uint32_t CountDeclLevels (clang::DeclContext *frame_decl_ctx, clang::DeclContext *child_decl_ctx, ConstString *child_name=nullptr, CompilerType *child_type=nullptr)
llvm::SmallVector< clang::ParmVarDecl * > CreateParameterDeclarations (clang::FunctionDecl *context, const clang::FunctionProtoType &prototype, const llvm::SmallVector< llvm::StringRef > &param_names)
 For each parameter type of prototype, creates a clang::ParmVarDecl whose clang::DeclContext is context.
clang::CXXMethodDecl * AddMethodToCXXRecordType (lldb::opaque_compiler_type_t type, llvm::StringRef name, llvm::StringRef asm_label, const CompilerType &method_type, lldb::AccessType access, bool is_virtual, bool is_static, bool is_inline, bool is_explicit, bool is_attr_used, bool is_artificial)
void AddMethodOverridesForCXXRecordType (lldb::opaque_compiler_type_t type)
std::unique_ptr< clang::CXXBaseSpecifier > CreateBaseClassSpecifier (lldb::opaque_compiler_type_t type, lldb::AccessType access, bool is_virtual, bool base_of_class)
bool TransferBaseClasses (lldb::opaque_compiler_type_t type, std::vector< std::unique_ptr< clang::CXXBaseSpecifier > > bases)
clang::EnumConstantDecl * AddEnumerationValueToEnumerationType (const CompilerType &enum_type, const Declaration &decl, const char *name, uint64_t enum_value, uint32_t enum_value_bit_size)
clang::EnumConstantDecl * AddEnumerationValueToEnumerationType (const CompilerType &enum_type, const Declaration &decl, const char *name, const llvm::APSInt &value)
CompilerType GetEnumerationIntegerType (CompilerType type)
 Returns the underlying integer type for an enum type.
LLVM_DUMP_METHOD void dump (lldb::opaque_compiler_type_t type) const override
 Convenience LLVM-style dump method for use in the debugger only.
void Dump (llvm::raw_ostream &output, llvm::StringRef filter, bool show_color) override
void DumpFromSymbolFile (Stream &s, llvm::StringRef symbol_name)
 Dump clang AST types from the symbol file.
bool DumpTypeValue (lldb::opaque_compiler_type_t type, 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) override
void DumpTypeDescription (lldb::opaque_compiler_type_t type, lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) override
 Dump the type to stdout.
void DumpTypeDescription (lldb::opaque_compiler_type_t type, Stream &s, lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) override
 Print a description of the type to a stream.
clang::ClassTemplateDecl * ParseClassTemplateDecl (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, lldb::AccessType access_type, const char *parent_name, int tag_decl_kind, const TypeSystemClang::TemplateParameterInfos &template_param_infos)
clang::BlockDecl * CreateBlockDeclaration (clang::DeclContext *ctx, OptionalClangModuleID owning_module)
clang::UsingDirectiveDecl * CreateUsingDirectiveDeclaration (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, clang::NamespaceDecl *ns_decl)
clang::UsingDecl * CreateUsingDeclaration (clang::DeclContext *current_decl_ctx, OptionalClangModuleID owning_module, clang::NamedDecl *target)
clang::VarDecl * CreateVariableDeclaration (clang::DeclContext *decl_context, OptionalClangModuleID owning_module, const char *name, clang::QualType type)
clang::DeclarationName GetDeclarationName (llvm::StringRef name, const CompilerType &function_clang_type)
clang::LangOptions * GetLangOpts () const
clang::SourceManager * GetSourceMgr () const
bool SetDeclIsForcefullyCompleted (const clang::TagDecl *td)
Public Member Functions inherited from lldb_private::TypeSystem
 TypeSystem ()
 ~TypeSystem () override
virtual SymbolFileGetSymbolFile () const
virtual void SetSymbolFile (SymbolFile *sym_file)
virtual ConstString GetMangledTypeName (lldb::opaque_compiler_type_t type)
 Defaults to GetTypeName(type).
virtual bool ShouldTreatScalarValueAsAddress (lldb::opaque_compiler_type_t type)
virtual UserExpressionGetUserExpression (llvm::StringRef expr, llvm::StringRef prefix, SourceLanguage language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj)
virtual FunctionCallerGetFunctionCaller (const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name)
virtual std::unique_ptr< UtilityFunctionCreateUtilityFunction (std::string text, std::string name)
virtual PersistentExpressionStateGetPersistentExpressionState ()
virtual LazyBool ShouldPrintAsOneLiner (void *type, ValueObject *valobj)
virtual bool IsMeaninglessWithoutDynamicResolution (void *type)
virtual std::optional< llvm::json::Value > ReportStatistics ()
bool GetHasForcefullyCompletedTypes () const
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static bool classof (const TypeSystem *ts)
static llvm::StringRef GetPluginNameStatic ()
static lldb::TypeSystemSP CreateInstance (lldb::LanguageType language, Module *module, Target *target)
static LanguageSet GetSupportedLanguagesForTypes ()
static LanguageSet GetSupportedLanguagesForExpressions ()
static void Initialize ()
static void Terminate ()
static TypeSystemClangGetASTContext (clang::ASTContext *ast_ctx)
static void DumpDeclHiearchy (clang::Decl *decl)
static void DumpDeclContextHiearchy (clang::DeclContext *decl_ctx)
static bool GetCompleteDecl (clang::ASTContext *ast, clang::Decl *decl)
static lldb::BasicType GetBasicTypeEnumeration (llvm::StringRef name)
static clang::DeclContext * GetDeclContextForType (clang::QualType type)
static clang::DeclContext * GetDeclContextForType (const CompilerType &type)
static bool AreTypesSame (CompilerType type1, CompilerType type2, bool ignore_qualifiers=false)
static bool IsOperator (llvm::StringRef name, clang::OverloadedOperatorKind &op_kind)
static clang::AccessSpecifier ConvertAccessTypeToAccessSpecifier (lldb::AccessType access)
static clang::AccessSpecifier UnifyAccessSpecifiers (clang::AccessSpecifier lhs, clang::AccessSpecifier rhs)
static clang::DeclContext * GetAsDeclContext (clang::FunctionDecl *function_decl)
static bool CheckOverloadedOperatorKindParameterCount (bool is_method, clang::OverloadedOperatorKind op_kind, uint32_t num_params)
static CompilerType GetFloatTypeFromBitSize (clang::ASTContext *ast, size_t bit_size)
static void SetOwningModule (clang::Decl *decl, OptionalClangModuleID owning_module)
 Set the owning module for decl.
static clang::DeclContext * DeclContextGetAsDeclContext (const CompilerDeclContext &dc)
static clang::ObjCMethodDecl * DeclContextGetAsObjCMethodDecl (const CompilerDeclContext &dc)
static clang::CXXMethodDecl * DeclContextGetAsCXXMethodDecl (const CompilerDeclContext &dc)
static clang::FunctionDecl * DeclContextGetAsFunctionDecl (const CompilerDeclContext &dc)
static clang::NamespaceDecl * DeclContextGetAsNamespaceDecl (const CompilerDeclContext &dc)
static std::optional< ClangASTMetadataDeclContextGetMetaData (const CompilerDeclContext &dc, const clang::Decl *object)
static clang::ASTContext * DeclContextGetTypeSystemClang (const CompilerDeclContext &dc)
static bool IsCXXClassType (const CompilerType &type)
static bool IsObjCClassType (const CompilerType &type)
static bool IsObjCObjectOrInterfaceType (const CompilerType &type)
static bool IsObjCObjectPointerType (const CompilerType &type, CompilerType *target_type=nullptr)
static bool IsClassType (lldb::opaque_compiler_type_t type)
static bool IsEnumType (lldb::opaque_compiler_type_t type)
static std::optional< std::string > GetCXXClassName (const CompilerType &type)
static uint32_t GetNumPointeeChildren (clang::QualType type)
static clang::FieldDecl * AddFieldToRecordType (const CompilerType &type, llvm::StringRef name, const CompilerType &field_type, lldb::AccessType access, uint32_t bitfield_bit_size)
static void BuildIndirectFields (const CompilerType &type)
static void SetIsPacked (const CompilerType &type)
static clang::VarDecl * AddVariableToRecordType (const CompilerType &type, llvm::StringRef name, const CompilerType &var_type, lldb::AccessType access)
static void SetIntegerInitializerForVariable (clang::VarDecl *var, const llvm::APInt &init_value)
 Initializes a variable with an integer value.
static void SetFloatingInitializerForVariable (clang::VarDecl *var, const llvm::APFloat &init_value)
 Initializes a variable with a floating point value.
static bool SetObjCSuperClass (const CompilerType &type, const CompilerType &superclass_compiler_type)
static bool AddObjCClassProperty (const CompilerType &type, const char *property_name, const CompilerType &property_compiler_type, clang::ObjCIvarDecl *ivar_decl, const char *property_setter_name, const char *property_getter_name, uint32_t property_attributes, ClangASTMetadata metadata)
static clang::ObjCMethodDecl * AddMethodToObjCObjectType (const CompilerType &type, const char *name, const CompilerType &method_compiler_type, bool is_artificial, bool is_variadic, bool is_objc_direct_call)
static bool SetHasExternalStorage (lldb::opaque_compiler_type_t type, bool has_extern)
static bool StartTagDeclarationDefinition (const CompilerType &type)
static bool CompleteTagDeclarationDefinition (const CompilerType &type)
static CompilerType CreateMemberPointerType (const CompilerType &type, const CompilerType &pointee_type)
static void DumpTypeName (const CompilerType &type)
static clang::EnumDecl * GetAsEnumDecl (const CompilerType &type)
static clang::RecordDecl * GetAsRecordDecl (const CompilerType &type)
static clang::TagDecl * GetAsTagDecl (const CompilerType &type)
static clang::TypedefNameDecl * GetAsTypedefDecl (const CompilerType &type)
static clang::CXXRecordDecl * GetAsCXXRecordDecl (lldb::opaque_compiler_type_t type)
static clang::ObjCInterfaceDecl * GetAsObjCInterfaceDecl (const CompilerType &type)
static lldb::opaque_compiler_type_t GetOpaqueCompilerType (clang::ASTContext *ast, lldb::BasicType basic_type)
static clang::QualType GetQualType (lldb::opaque_compiler_type_t type)
static clang::QualType GetCanonicalQualType (lldb::opaque_compiler_type_t type)
static void RequireCompleteType (CompilerType type)
 Complete a type from debug info, or mark it as forcefully completed if there is no definition of the type in the current Module.
Static Public Member Functions inherited from lldb_private::TypeSystem
static lldb::TypeSystemSP CreateInstance (lldb::LanguageType language, Module *module)
static lldb::TypeSystemSP CreateInstance (lldb::LanguageType language, Target *target)
static bool SupportsLanguageStatic (lldb::LanguageType language)

Private Types

typedef llvm::DenseMap< const clang::Decl *, ClangASTMetadataDeclMetadataMap
typedef llvm::DenseMap< const clang::Type *, ClangASTMetadataTypeMetadataMap
typedef llvm::DenseMap< const clang::CXXRecordDecl *, clang::AccessSpecifier > CXXRecordDeclAccessMap

Private Member Functions

clang::PrintingPolicy GetTypePrintingPolicy ()
 Returns the PrintingPolicy used when generating the internal type names.
std::string GetTypeNameForDecl (const clang::NamedDecl *named_decl, bool qualified=true)
 Returns the internal type name for the given NamedDecl using the type printing policy.
const clang::ClassTemplateSpecializationDecl * GetAsTemplateSpecialization (lldb::opaque_compiler_type_t type)
bool IsTypeImpl (lldb::opaque_compiler_type_t type, llvm::function_ref< bool(clang::QualType)> predicate) const
void LogCreation () const
 Emits information about this TypeSystem into the expression log.
llvm::Expected< uint64_t > GetObjCBitSize (clang::QualType qual_type, ExecutionContextScope *exe_scope)
 TypeSystemClang (const TypeSystemClang &)
const TypeSystemClangoperator= (const TypeSystemClang &)
void CreateASTContext ()
 Creates the internal ASTContext.
void SetTargetTriple (llvm::StringRef target_triple)

Private Attributes

std::string m_target_triple
std::unique_ptr< clang::ASTContext > m_ast_up
std::unique_ptr< clang::LangOptions > m_language_options_up
std::unique_ptr< clang::FileManager > m_file_manager_up
std::unique_ptr< clang::SourceManager > m_source_manager_up
std::unique_ptr< clang::DiagnosticOptions > m_diagnostic_options_up
std::unique_ptr< clang::DiagnosticsEngine > m_diagnostics_engine_up
std::unique_ptr< clang::DiagnosticConsumer > m_diagnostic_consumer_up
std::shared_ptr< clang::TargetOptions > m_target_options_rp
std::unique_ptr< clang::TargetInfo > m_target_info_up
std::unique_ptr< clang::IdentifierTable > m_identifier_table_up
std::unique_ptr< clang::SelectorTable > m_selector_table_up
std::unique_ptr< clang::Builtin::Context > m_builtins_up
std::unique_ptr< clang::HeaderSearchOptions > m_header_search_opts_up
std::unique_ptr< clang::HeaderSearch > m_header_search_up
std::unique_ptr< clang::ModuleMap > m_module_map_up
std::unique_ptr< DWARFASTParserClangm_dwarf_ast_parser_up
std::unique_ptr< PDBASTParserm_pdb_ast_parser_up
std::unique_ptr< npdb::PdbAstBuilderm_native_pdb_ast_parser_up
std::unique_ptr< clang::MangleContext > m_mangle_ctx_up
uint32_t m_pointer_byte_size = 0
bool m_ast_owned = false
std::string m_display_name
 A string describing what this TypeSystemClang represents (e.g., AST for debug information, an expression, some other utility ClangAST).
DeclMetadataMap m_decl_metadata
 Maps Decls to their associated ClangASTMetadata.
TypeMetadataMap m_type_metadata
 Maps Types to their associated ClangASTMetadata.
CXXRecordDeclAccessMap m_cxx_record_decl_access
 Maps CXXRecordDecl to their most recent added method/field's AccessSpecifier.
clang::Sema * m_sema = nullptr
 The sema associated that is currently used to build this ASTContext.

Static Private Attributes

static char ID

Additional Inherited Members

Protected Attributes inherited from lldb_private::TypeSystem
SymbolFilem_sym_file = nullptr
bool m_has_forcefully_completed_types = false
 Used for reporting statistics.

Detailed Description

A TypeSystem implementation based on Clang.

This class uses a single clang::ASTContext as the backend for storing its types and declarations. Every clang::ASTContext should also just have a single associated TypeSystemClang instance that manages it.

The clang::ASTContext instance can either be created by TypeSystemClang itself or it can adopt an existing clang::ASTContext (for example, when it is necessary to provide a TypeSystem interface for an existing clang::ASTContext that was created by clang::CompilerInstance).

Definition at line 111 of file TypeSystemClang.h.

Member Typedef Documentation

◆ CompleteObjCInterfaceDeclCallback

typedef void(* lldb_private::TypeSystemClang::CompleteObjCInterfaceDeclCallback) (void *baton, clang::ObjCInterfaceDecl *)

Definition at line 117 of file TypeSystemClang.h.

◆ CompleteTagDeclCallback

typedef void(* lldb_private::TypeSystemClang::CompleteTagDeclCallback) (void *baton, clang::TagDecl *)

Definition at line 116 of file TypeSystemClang.h.

◆ CXXRecordDeclAccessMap

typedef llvm::DenseMap<const clang::CXXRecordDecl *, clang::AccessSpecifier> lldb_private::TypeSystemClang::CXXRecordDeclAccessMap
private

Definition at line 1236 of file TypeSystemClang.h.

◆ DeclMetadataMap

typedef llvm::DenseMap<const clang::Decl *, ClangASTMetadata> lldb_private::TypeSystemClang::DeclMetadataMap
private

Definition at line 1227 of file TypeSystemClang.h.

◆ TypeMetadataMap

typedef llvm::DenseMap<const clang::Type *, ClangASTMetadata> lldb_private::TypeSystemClang::TypeMetadataMap
private

Definition at line 1231 of file TypeSystemClang.h.

Constructor & Destructor Documentation

◆ TypeSystemClang() [1/3]

TypeSystemClang::TypeSystemClang ( llvm::StringRef name,
llvm::Triple triple )
explicit

Constructs a TypeSystemClang with an ASTContext using the given triple.

Parameters
nameThe name for the TypeSystemClang (for logging purposes)
tripleThe llvm::Triple used for the ASTContext. The triple defines certain characteristics of the ASTContext and its types (e.g., whether certain primitive types exist or what their signedness is).

Definition at line 485 of file TypeSystemClang.cpp.

References CreateASTContext(), LogCreation(), m_display_name, and SetTargetTriple().

Referenced by AddFieldToRecordType(), AddMethodToObjCObjectType(), AddObjCClassProperty(), AddVariableToRecordType(), AreTypesSame(), BuildIndirectFields(), CompleteTagDeclarationDefinition(), CreateMemberPointerType(), DeclContextGetMetaData(), DeclContextGetTypeSystemClang(), GetASTContext(), lldb_private::ScratchTypeSystemClang::GetIsolatedAST(), operator=(), RequireCompleteType(), lldb_private::ScratchTypeSystemClang::ScratchTypeSystemClang(), SetIsPacked(), SetObjCSuperClass(), and TypeSystemClang().

◆ TypeSystemClang() [2/3]

lldb_private::TypeSystemClang::TypeSystemClang ( llvm::StringRef name,
clang::ASTContext & existing_ctxt )
explicit

Constructs a TypeSystemClang that uses an existing ASTContext internally.

Useful when having an existing ASTContext created by Clang.

Parameters
nameThe name for the TypeSystemClang (for logging purposes)
existing_ctxtAn existing ASTContext.

◆ ~TypeSystemClang()

TypeSystemClang::~TypeSystemClang ( )
override

Definition at line 509 of file TypeSystemClang.cpp.

References Finalize().

◆ TypeSystemClang() [3/3]

lldb_private::TypeSystemClang::TypeSystemClang ( const TypeSystemClang & )
private

References TypeSystemClang().

Member Function Documentation

◆ AddConstModifier()

CompilerType TypeSystemClang::AddConstModifier ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4622 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ AddEnumerationValueToEnumerationType() [1/2]

clang::EnumConstantDecl * TypeSystemClang::AddEnumerationValueToEnumerationType ( const CompilerType & enum_type,
const Declaration & decl,
const char * name,
const llvm::APSInt & value )

◆ AddEnumerationValueToEnumerationType() [2/2]

clang::EnumConstantDecl * TypeSystemClang::AddEnumerationValueToEnumerationType ( const CompilerType & enum_type,
const Declaration & decl,
const char * name,
uint64_t enum_value,
uint32_t enum_value_bit_size )

◆ AddFieldToRecordType()

◆ AddMethodOverridesForCXXRecordType()

void TypeSystemClang::AddMethodOverridesForCXXRecordType ( lldb::opaque_compiler_type_t type)

Definition at line 7876 of file TypeSystemClang.cpp.

References GetAsCXXRecordDecl().

◆ AddMethodToCXXRecordType()

clang::CXXMethodDecl * TypeSystemClang::AddMethodToCXXRecordType ( lldb::opaque_compiler_type_t type,
llvm::StringRef name,
llvm::StringRef asm_label,
const CompilerType & method_type,
lldb::AccessType access,
bool is_virtual,
bool is_static,
bool is_inline,
bool is_explicit,
bool is_attr_used,
bool is_artificial )

◆ AddMethodToObjCObjectType()

clang::ObjCMethodDecl * TypeSystemClang::AddMethodToObjCObjectType ( const CompilerType & type,
const char * name,
const CompilerType & method_compiler_type,
bool is_artificial,
bool is_variadic,
bool is_objc_direct_call )
static

◆ AddObjCClassProperty()

bool TypeSystemClang::AddObjCClassProperty ( const CompilerType & type,
const char * property_name,
const CompilerType & property_compiler_type,
clang::ObjCIvarDecl * ivar_decl,
const char * property_setter_name,
const char * property_getter_name,
uint32_t property_attributes,
ClangASTMetadata metadata )
static

◆ AddPtrAuthModifier()

CompilerType TypeSystemClang::AddPtrAuthModifier ( lldb::opaque_compiler_type_t type,
uint32_t payload )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4632 of file TypeSystemClang.cpp.

References getASTContext(), GetQualType(), and GetType().

◆ AddRestrictModifier()

CompilerType TypeSystemClang::AddRestrictModifier ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4655 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ AddVariableToRecordType()

◆ AddVolatileModifier()

CompilerType TypeSystemClang::AddVolatileModifier ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4645 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ AreTypesSame()

◆ BaseSpecifierIsEmpty()

bool TypeSystemClang::BaseSpecifierIsEmpty ( const clang::CXXBaseSpecifier * b)

Definition at line 1837 of file TypeSystemClang.cpp.

References RecordHasFields().

Referenced by GetIndexForRecordBase(), and GetNumBaseClasses().

◆ BuildIndirectFields()

◆ CanPassInRegisters()

bool TypeSystemClang::CanPassInRegisters ( const CompilerType & type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3723 of file TypeSystemClang.cpp.

References GetAsRecordDecl().

◆ CheckOverloadedOperatorKindParameterCount()

bool TypeSystemClang::CheckOverloadedOperatorKindParameterCount ( bool is_method,
clang::OverloadedOperatorKind op_kind,
uint32_t num_params )
static

◆ classof()

bool lldb_private::TypeSystemClang::classof ( const TypeSystem * ts)
inlinestatic

◆ CompleteObjCInterfaceDecl()

void TypeSystemClang::CompleteObjCInterfaceDecl ( clang::ObjCInterfaceDecl * decl)

◆ CompleteTagDecl()

void TypeSystemClang::CompleteTagDecl ( clang::TagDecl * decl)

◆ CompleteTagDeclarationDefinition()

◆ ConvertAccessTypeToAccessSpecifier()

clang::AccessSpecifier TypeSystemClang::ConvertAccessTypeToAccessSpecifier ( lldb::AccessType access)
static

◆ CountDeclLevels()

uint32_t TypeSystemClang::CountDeclLevels ( clang::DeclContext * frame_decl_ctx,
clang::DeclContext * child_decl_ctx,
ConstString * child_name = nullptr,
CompilerType * child_type = nullptr )

◆ CreateArrayType()

CompilerType TypeSystemClang::CreateArrayType ( const CompilerType & element_type,
std::optional< size_t > element_count,
bool is_vector )

◆ CreateASTContext()

◆ CreateBaseClassSpecifier()

std::unique_ptr< clang::CXXBaseSpecifier > TypeSystemClang::CreateBaseClassSpecifier ( lldb::opaque_compiler_type_t type,
lldb::AccessType access,
bool is_virtual,
bool base_of_class )

◆ CreateBlockDeclaration()

clang::BlockDecl * TypeSystemClang::CreateBlockDeclaration ( clang::DeclContext * ctx,
OptionalClangModuleID owning_module )

Definition at line 1928 of file TypeSystemClang.cpp.

References getASTContext(), and SetOwningModule().

◆ CreateBlockPointerType()

CompilerType TypeSystemClang::CreateBlockPointerType ( const CompilerType & function_type)

◆ CreateClassTemplateDecl()

ClassTemplateDecl * TypeSystemClang::CreateClassTemplateDecl ( clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
lldb::AccessType access_type,
llvm::StringRef class_name,
int kind,
const TemplateParameterInfos & infos )

◆ CreateClassTemplateSpecializationDecl()

ClassTemplateSpecializationDecl * TypeSystemClang::CreateClassTemplateSpecializationDecl ( clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
clang::ClassTemplateDecl * class_template_decl,
int kind,
const TemplateParameterInfos & infos )

◆ CreateClassTemplateSpecializationType()

CompilerType TypeSystemClang::CreateClassTemplateSpecializationType ( clang::ClassTemplateSpecializationDecl * class_template_specialization_decl)

Definition at line 1695 of file TypeSystemClang.cpp.

References getASTContext(), and GetType().

◆ CreateDeclContext()

CompilerDeclContext TypeSystemClang::CreateDeclContext ( clang::DeclContext * ctx)

Creates a CompilerDeclContext from the given DeclContext with the current TypeSystemClang instance as its typesystem.

The DeclContext has to come from the ASTContext of this TypeSystemClang.

Definition at line 1165 of file TypeSystemClang.cpp.

References getASTContext().

Referenced by CountDeclLevels(), DeclContextFindDeclByName(), DeclGetDeclContext(), GetCompilerDeclContextForType(), SymbolFilePDB::GetDeclContextContainingUID(), and SymbolFilePDB::GetDeclContextForUID().

◆ CreateEnumerationType()

CompilerType TypeSystemClang::CreateEnumerationType ( llvm::StringRef name,
clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
const Declaration & decl,
const CompilerType & integer_qual_type,
bool is_scoped,
std::optional< clang::EnumExtensibilityAttr::Kind > enum_kind = std::nullopt )

◆ CreateFunctionDeclaration()

FunctionDecl * TypeSystemClang::CreateFunctionDeclaration ( clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
llvm::StringRef name,
const CompilerType & function_Type,
clang::StorageClass storage,
bool is_inline,
llvm::StringRef asm_label )

◆ CreateFunctionTemplateDecl()

clang::FunctionTemplateDecl * TypeSystemClang::CreateFunctionTemplateDecl ( clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
clang::FunctionDecl * func_decl,
const TemplateParameterInfos & infos )

◆ CreateFunctionTemplateSpecializationInfo()

void TypeSystemClang::CreateFunctionTemplateSpecializationInfo ( clang::FunctionDecl * func_decl,
clang::FunctionTemplateDecl * Template,
const TemplateParameterInfos & infos )

◆ CreateFunctionType()

CompilerType TypeSystemClang::CreateFunctionType ( const CompilerType & result_type,
llvm::ArrayRef< CompilerType > args,
bool is_variadic,
unsigned type_quals,
clang::CallingConv cc = clang::CC_C,
clang::RefQualifierKind ref_qual = clang::RQ_None )

◆ CreateGenericFunctionPrototype()

CompilerType TypeSystemClang::CreateGenericFunctionPrototype ( )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4726 of file TypeSystemClang.cpp.

References getASTContext(), and GetType().

◆ CreateInstance()

◆ CreateMemberPointerType()

◆ CreateObjCClass()

CompilerType TypeSystemClang::CreateObjCClass ( llvm::StringRef name,
clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
bool isInternal,
std::optional< ClangASTMetadata > metadata = std::nullopt )

Definition at line 1815 of file TypeSystemClang.cpp.

References getASTContext(), GetType(), SetMetadata(), and SetOwningModule().

Referenced by CreateRecordType().

◆ CreateParameterDeclaration()

ParmVarDecl * TypeSystemClang::CreateParameterDeclaration ( clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
const char * name,
const CompilerType & param_type,
int storage,
bool add_decl = false )

◆ CreateParameterDeclarations()

llvm::SmallVector< clang::ParmVarDecl * > TypeSystemClang::CreateParameterDeclarations ( clang::FunctionDecl * context,
const clang::FunctionProtoType & prototype,
const llvm::SmallVector< llvm::StringRef > & param_names )

For each parameter type of prototype, creates a clang::ParmVarDecl whose clang::DeclContext is context.

Parameters
[in]contextNon-null clang::FunctionDecl which will be the clang::DeclContext of each parameter created/returned by this function.
[in]prototypeThe clang::FunctionProtoType of context.
[in]param_namesThe ith element of this vector contains the name of the ith parameter. This parameter may be unnamed, in which case the ith entry in param_names is an empty string. This vector is either empty, or will have an entry for each parameter of the prototype regardless of whether a parameter is unnamed or not.
Returns
A list of newly created of non-null clang::ParmVarDecl (one for each parameter of prototype).

Definition at line 7665 of file TypeSystemClang.cpp.

References CreateParameterDeclaration(), and GetType().

Referenced by AddMethodToCXXRecordType().

◆ CreateRecordType()

◆ CreateStructForIdentifier()

◆ CreateTemplateTemplateParmDecl()

TemplateTemplateParmDecl * TypeSystemClang::CreateTemplateTemplateParmDecl ( const char * template_name)

Definition at line 1630 of file TypeSystemClang.cpp.

References CreateTemplateParameterList(), and getASTContext().

◆ CreateTypedef()

CompilerType TypeSystemClang::CreateTypedef ( lldb::opaque_compiler_type_t type,
const char * name,
const CompilerDeclContext & decl_ctx,
uint32_t opaque_payload )
overridevirtual

Using the current type, create a new typedef to that type using "typedef_name" as the name and "decl_ctx" as the decl context.

Parameters
opaque_payloadis an opaque TypePayloadClang.

Reimplemented from lldb_private::TypeSystem.

Definition at line 4664 of file TypeSystemClang.cpp.

References DeclContextGetAsDeclContext(), getASTContext(), GetQualType(), GetType(), and SetOwningModule().

◆ CreateUsingDeclaration()

clang::UsingDecl * TypeSystemClang::CreateUsingDeclaration ( clang::DeclContext * current_decl_ctx,
OptionalClangModuleID owning_module,
clang::NamedDecl * target )

Definition at line 1977 of file TypeSystemClang.cpp.

References getASTContext(), and SetOwningModule().

◆ CreateUsingDirectiveDeclaration()

clang::UsingDirectiveDecl * TypeSystemClang::CreateUsingDirectiveDeclaration ( clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
clang::NamespaceDecl * ns_decl )

Definition at line 1958 of file TypeSystemClang.cpp.

References FindLCABetweenDecls(), getASTContext(), and SetOwningModule().

◆ CreateVariableDeclaration()

clang::VarDecl * TypeSystemClang::CreateVariableDeclaration ( clang::DeclContext * decl_context,
OptionalClangModuleID owning_module,
const char * name,
clang::QualType type )

Definition at line 1996 of file TypeSystemClang.cpp.

References getASTContext(), and SetOwningModule().

◆ DeclContextFindDeclByName()

std::vector< CompilerDecl > TypeSystemClang::DeclContextFindDeclByName ( void * opaque_decl_ctx,
ConstString name,
const bool ignore_using_decls )
overridevirtual

◆ DeclContextGetAsCXXMethodDecl()

CXXMethodDecl * TypeSystemClang::DeclContextGetAsCXXMethodDecl ( const CompilerDeclContext & dc)
static

◆ DeclContextGetAsDeclContext()

clang::DeclContext * TypeSystemClang::DeclContextGetAsDeclContext ( const CompilerDeclContext & dc)
static

◆ DeclContextGetAsFunctionDecl()

clang::FunctionDecl * TypeSystemClang::DeclContextGetAsFunctionDecl ( const CompilerDeclContext & dc)
static

◆ DeclContextGetAsNamespaceDecl()

clang::NamespaceDecl * TypeSystemClang::DeclContextGetAsNamespaceDecl ( const CompilerDeclContext & dc)
static

◆ DeclContextGetAsObjCMethodDecl()

◆ DeclContextGetCompilerContext()

std::vector< lldb_private::CompilerContext > TypeSystemClang::DeclContextGetCompilerContext ( void * opaque_decl_ctx)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9478 of file TypeSystemClang.cpp.

References InsertCompilerContext().

◆ DeclContextGetLanguage()

lldb::LanguageType TypeSystemClang::DeclContextGetLanguage ( void * opaque_decl_ctx)
overridevirtual

◆ DeclContextGetMetaData()

std::optional< ClangASTMetadata > TypeSystemClang::DeclContextGetMetaData ( const CompilerDeclContext & dc,
const clang::Decl * object )
static

◆ DeclContextGetName()

ConstString TypeSystemClang::DeclContextGetName ( void * opaque_decl_ctx)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 9432 of file TypeSystemClang.cpp.

References GetTypePrintingPolicy().

Referenced by InsertCompilerContext().

◆ DeclContextGetScopeQualifiedName()

ConstString TypeSystemClang::DeclContextGetScopeQualifiedName ( void * opaque_decl_ctx)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 9449 of file TypeSystemClang.cpp.

References GetTypeNameForDecl().

◆ DeclContextGetTypeSystemClang()

clang::ASTContext * TypeSystemClang::DeclContextGetTypeSystemClang ( const CompilerDeclContext & dc)
static

◆ DeclContextIsClassMethod()

bool TypeSystemClang::DeclContextIsClassMethod ( void * opaque_decl_ctx)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 9459 of file TypeSystemClang.cpp.

References GetMetadata().

◆ DeclContextIsContainedInLookup()

bool TypeSystemClang::DeclContextIsContainedInLookup ( void * opaque_decl_ctx,
void * other_opaque_decl_ctx )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 9485 of file TypeSystemClang.cpp.

◆ DeclGetCompilerContext()

std::vector< lldb_private::CompilerContext > TypeSystemClang::DeclGetCompilerContext ( void * opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9203 of file TypeSystemClang.cpp.

References DeclGetName(), GetCompilerKind(), and InsertCompilerContext().

◆ DeclGetConstantValue()

Scalar TypeSystemClang::DeclGetConstantValue ( void * opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9237 of file TypeSystemClang.cpp.

References getASTContext().

◆ DeclGetDeclContext()

CompilerDeclContext TypeSystemClang::DeclGetDeclContext ( void * opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9133 of file TypeSystemClang.cpp.

References CreateDeclContext().

◆ DeclGetFunctionArgumentType()

CompilerType TypeSystemClang::DeclGetFunctionArgumentType ( void * opaque_decl,
size_t arg_idx )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9219 of file TypeSystemClang.cpp.

References GetType().

◆ DeclGetFunctionNumArguments()

size_t TypeSystemClang::DeclGetFunctionNumArguments ( void * opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9150 of file TypeSystemClang.cpp.

◆ DeclGetFunctionReturnType()

CompilerType TypeSystemClang::DeclGetFunctionReturnType ( void * opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9139 of file TypeSystemClang.cpp.

References GetType().

◆ DeclGetMangledName()

ConstString TypeSystemClang::DeclGetMangledName ( void * opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9093 of file TypeSystemClang.cpp.

References ExtractMangledNameFromFunctionCallLabel(), and getMangleContext().

◆ DeclGetName()

ConstString TypeSystemClang::DeclGetName ( void * opaque_decl)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 9068 of file TypeSystemClang.cpp.

References GetTypeNameForDecl().

Referenced by DeclGetCompilerContext().

◆ Dump()

void TypeSystemClang::Dump ( llvm::raw_ostream & output,
llvm::StringRef filter,
bool show_color )
overridevirtual

◆ dump()

LLVM_DUMP_METHOD void TypeSystemClang::dump ( lldb::opaque_compiler_type_t type) const
overridevirtual

Convenience LLVM-style dump method for use in the debugger only.

In contrast to the other Dump() methods this directly invokes clang::QualType::dump().

Implements lldb_private::TypeSystem.

Definition at line 8528 of file TypeSystemClang.cpp.

References GetQualType().

◆ DumpDeclContextHiearchy()

void TypeSystemClang::DumpDeclContextHiearchy ( clang::DeclContext * decl_ctx)
static

Definition at line 2416 of file TypeSystemClang.cpp.

References DumpDeclContextHiearchy().

Referenced by DumpDeclContextHiearchy(), and DumpDeclHiearchy().

◆ DumpDeclHiearchy()

void TypeSystemClang::DumpDeclHiearchy ( clang::Decl * decl)
static

Definition at line 2430 of file TypeSystemClang.cpp.

References DumpDeclContextHiearchy().

◆ DumpFromSymbolFile()

void TypeSystemClang::DumpFromSymbolFile ( Stream & s,
llvm::StringRef symbol_name )

◆ DumpTypeDescription() [1/2]

void TypeSystemClang::DumpTypeDescription ( lldb::opaque_compiler_type_t type,
lldb::DescriptionLevel level = lldb::eDescriptionLevelFull )
overridevirtual

Dump the type to stdout.

Implements lldb_private::TypeSystem.

Definition at line 8824 of file TypeSystemClang.cpp.

References DumpTypeDescription(), GetMetadata(), and lldb_private::ClangUtil::GetQualType().

Referenced by DumpTypeDescription(), and GetObjCBitSize().

◆ DumpTypeDescription() [2/2]

void TypeSystemClang::DumpTypeDescription ( lldb::opaque_compiler_type_t type,
Stream & s,
lldb::DescriptionLevel level = lldb::eDescriptionLevelFull )
overridevirtual

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.

Implements lldb_private::TypeSystem.

Definition at line 8836 of file TypeSystemClang.cpp.

References lldb::eDescriptionLevelVerbose, getASTContext(), GetCompleteType(), lldb_private::Stream::GetIndentLevel(), GetQualType(), GetTypeNameForDecl(), lldb_private::Stream::PutCString(), RemoveWrappingTypes(), and lldb_private::Stream::Write().

◆ DumpTypeName()

◆ DumpTypeValue()

bool TypeSystemClang::DumpTypeValue ( lldb::opaque_compiler_type_t type,
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 )
overridevirtual

◆ FieldIsBitfield()

bool TypeSystemClang::FieldIsBitfield ( clang::FieldDecl * field,
uint32_t & bitfield_bit_size )

Definition at line 1762 of file TypeSystemClang.cpp.

References getASTContext(), and UINT32_MAX.

Referenced by GetChildCompilerTypeAtIndex().

◆ Finalize()

void TypeSystemClang::Finalize ( )
overridevirtual

◆ ForEachEnumerator()

void TypeSystemClang::ForEachEnumerator ( lldb::opaque_compiler_type_t type,
std::function< bool(const CompilerType &integer_type, ConstString name, const llvm::APSInt &value)> const & callback )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 5556 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and GetType().

◆ GetArrayElementType()

CompilerType TypeSystemClang::GetArrayElementType ( lldb::opaque_compiler_type_t type,
ExecutionContextScope * exe_scope )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4291 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ GetArrayType()

CompilerType TypeSystemClang::GetArrayType ( lldb::opaque_compiler_type_t type,
uint64_t size )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4307 of file TypeSystemClang.cpp.

References getASTContext(), GetCanonicalQualType(), and GetType().

◆ GetAsCXXRecordDecl()

clang::CXXRecordDecl * TypeSystemClang::GetAsCXXRecordDecl ( lldb::opaque_compiler_type_t type)
static

◆ GetAsDeclContext()

clang::DeclContext * lldb_private::TypeSystemClang::GetAsDeclContext ( clang::FunctionDecl * function_decl)
static

◆ GetAsEnumDecl()

clang::EnumDecl * TypeSystemClang::GetAsEnumDecl ( const CompilerType & type)
static

◆ GetAsObjCInterfaceDecl()

clang::ObjCInterfaceDecl * TypeSystemClang::GetAsObjCInterfaceDecl ( const CompilerType & type)
static

◆ GetAsRecordDecl()

clang::RecordDecl * TypeSystemClang::GetAsRecordDecl ( const CompilerType & type)
static

◆ GetAsTagDecl()

clang::TagDecl * TypeSystemClang::GetAsTagDecl ( const CompilerType & type)
static

◆ GetASTContext()

◆ getASTContext()

ASTContext & TypeSystemClang::getASTContext ( ) const

Returns the clang::ASTContext instance managed by this TypeSystemClang.

Definition at line 626 of file TypeSystemClang.cpp.

References m_ast_up.

Referenced by AddEnumerationValueToEnumerationType(), AddMethodToCXXRecordType(), AddPtrAuthModifier(), lldb_private::AppleObjCTypeEncodingParser::BuildObjCObjectPointerType(), lldb_private::AppleObjCTypeEncodingParser::BuildType(), lldb_private::ClangASTImporter::CopyType(), CreateArrayType(), CreateBaseClassSpecifier(), CreateBlockDeclaration(), CreateClassTemplateDecl(), CreateClassTemplateSpecializationDecl(), CreateClassTemplateSpecializationType(), CreateDeclContext(), CreateEnumerationType(), CreateFunctionDeclaration(), CreateFunctionTemplateDecl(), CreateFunctionType(), CreateGenericFunctionPrototype(), CreateObjCClass(), CreateParameterDeclaration(), CreateRecordType(), CreateStructForIdentifier(), CreateTemplateTemplateParmDecl(), CreateTypedef(), CreateUsingDeclaration(), CreateUsingDirectiveDeclaration(), CreateVariableDeclaration(), DeclContextGetTypeSystemClang(), DeclGetConstantValue(), lldb_private::ClangASTImporter::DeportType(), lldb_private::ClangExpressionDeclMap::DeportType(), Dump(), DumpFromSymbolFile(), DumpTypeDescription(), DumpTypeValue(), DWARFASTParserClang::ExtractIntFromFormValue(), FieldIsBitfield(), lldb_private::ScratchTypeSystemClang::ForgetSource(), GetArrayType(), GetAtomicType(), GetBasicType(), GetBitSize(), GetBuiltinTypeForDWARFEncodingAndBitSize(), GetBuiltinTypeForEncodingAndBitSize(), GetBuiltinTypeForPDBEncodingAndBitSize(), GetChildCompilerTypeAtIndex(), GetCompilerDecl(), GetCompleteDecl(), GetCompleteType(), GetCStringType(), GetDeclarationName(), GetDirectBaseClassAtIndex(), GetDirectNestedTypeWithName(), GetDisplayTypeName(), GetFieldAtIndex(), GetFloatTypeSemantics(), GetFullyUnqualifiedType(), GetIndexOfChildMemberWithName(), GetIntTypeFromBitSize(), GetLValueReferenceType(), getMangleContext(), GetMemberFunctionAtIndex(), GetMinimumLanguage(), GetNumChildren(), GetNumMemberFunctions(), GetObjCBitSize(), GetOrCreateClangModule(), GetOrCreateStructForIdentifier(), GetPointerSizedIntType(), GetPointerType(), GetRValueReferenceType(), GetStaticFieldWithName(), getTargetInfo(), GetTranslationUnitDecl(), GetType(), GetTypeBitAlign(), GetTypeForIdentifier(), GetTypeInfo(), GetTypePrintingPolicy(), GetUniqueNamespaceDeclaration(), GetVirtualBaseClassAtIndex(), lldb_private::ClangASTSource::InstallASTContext(), IsCompleteType(), IsHomogeneousAggregate(), LogCreation(), and SetExternalSource().

◆ GetAsTemplateSpecialization()

const clang::ClassTemplateSpecializationDecl * TypeSystemClang::GetAsTemplateSpecialization ( lldb::opaque_compiler_type_t type)
private

◆ GetAsTypedefDecl()

clang::TypedefNameDecl * TypeSystemClang::GetAsTypedefDecl ( const CompilerType & type)
static

◆ GetAtomicType()

CompilerType TypeSystemClang::GetAtomicType ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4615 of file TypeSystemClang.cpp.

References getASTContext(), GetQualType(), and GetType().

◆ GetBasicType()

◆ GetBasicTypeEnumeration() [1/2]

◆ GetBasicTypeEnumeration() [2/2]

◆ GetBasicTypeFromAST()

CompilerType TypeSystemClang::GetBasicTypeFromAST ( lldb::BasicType basic_type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4722 of file TypeSystemClang.cpp.

References GetBasicType().

◆ GetBitSize()

llvm::Expected< uint64_t > TypeSystemClang::GetBitSize ( lldb::opaque_compiler_type_t type,
ExecutionContextScope * exe_scope )
overridevirtual

◆ GetBuiltinTypeByName()

CompilerType TypeSystemClang::GetBuiltinTypeByName ( ConstString name)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 5475 of file TypeSystemClang.cpp.

References GetBasicType(), and GetBasicTypeEnumeration().

◆ GetBuiltinTypeForDWARFEncodingAndBitSize()

CompilerType TypeSystemClang::GetBuiltinTypeForDWARFEncodingAndBitSize ( llvm::StringRef type_name,
uint32_t dw_ate,
uint32_t bit_size )

◆ GetBuiltinTypeForEncodingAndBitSize()

CompilerType TypeSystemClang::GetBuiltinTypeForEncodingAndBitSize ( lldb::Encoding encoding,
size_t bit_size )
overridevirtual

◆ GetByteSize()

llvm::Expected< uint64_t > lldb_private::TypeSystemClang::GetByteSize ( lldb::opaque_compiler_type_t type,
ExecutionContextScope * exe_scope )
inline

Definition at line 828 of file TypeSystemClang.h.

References GetBitSize().

Referenced by GetPointerByteSize().

◆ GetCanonicalQualType()

◆ GetCanonicalType()

CompilerType TypeSystemClang::GetCanonicalType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4325 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and GetType().

◆ GetChildCompilerTypeAtIndex()

llvm::Expected< CompilerType > TypeSystemClang::GetChildCompilerTypeAtIndex ( lldb::opaque_compiler_type_t type,
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 )
overridevirtual

◆ GetCompilerDecl()

CompilerDecl lldb_private::TypeSystemClang::GetCompilerDecl ( clang::Decl * decl)
inline

Creates a CompilerDecl from the given Decl with the current TypeSystemClang instance as its typesystem.

The Decl has to come from the ASTContext of this TypeSystemClang.

Definition at line 542 of file TypeSystemClang.h.

References getASTContext().

Referenced by DeclContextFindDeclByName(), SymbolFilePDB::GetDeclForUID(), and GetMemberFunctionAtIndex().

◆ GetCompilerDeclContextForType()

CompilerDeclContext TypeSystemClang::GetCompilerDeclContextForType ( const CompilerType & type)
overridevirtual

Returns the direct parent context of specified type.

Reimplemented from lldb_private::TypeSystem.

Definition at line 2555 of file TypeSystemClang.cpp.

References CreateDeclContext(), and GetDeclContextForType().

◆ GetCompleteDecl() [1/2]

bool TypeSystemClang::GetCompleteDecl ( clang::ASTContext * ast,
clang::Decl * decl )
static

Definition at line 2455 of file TypeSystemClang.cpp.

◆ GetCompleteDecl() [2/2]

◆ GetCompleteType()

◆ GetCStringType()

CompilerType TypeSystemClang::GetCStringType ( bool is_const)

Definition at line 1125 of file TypeSystemClang.cpp.

References getASTContext(), and GetType().

◆ GetCXXClassName()

std::optional< std::string > TypeSystemClang::GetCXXClassName ( const CompilerType & type)
static

◆ GetCXXRecordDeclAccess()

clang::AccessSpecifier TypeSystemClang::GetCXXRecordDeclAccess ( const clang::CXXRecordDecl * object)

Definition at line 2542 of file TypeSystemClang.cpp.

References m_cxx_record_decl_access.

Referenced by AddMethodToCXXRecordType().

◆ GetDeclarationName()

clang::DeclarationName TypeSystemClang::GetDeclarationName ( llvm::StringRef name,
const CompilerType & function_clang_type )

◆ GetDeclContextForType() [1/2]

◆ GetDeclContextForType() [2/2]

clang::DeclContext * TypeSystemClang::GetDeclContextForType ( const CompilerType & type)
static

◆ GetDereferencedType()

llvm::Expected< CompilerType > TypeSystemClang::GetDereferencedType ( lldb::opaque_compiler_type_t type,
ExecutionContext * exe_ctx,
std::string & deref_name,
uint32_t & deref_byte_size,
int32_t & deref_byte_offset,
ValueObject * valobj,
uint64_t & language_flags )
overridevirtual

◆ GetDirectBaseClassAtIndex()

CompilerType TypeSystemClang::GetDirectBaseClassAtIndex ( lldb::opaque_compiler_type_t type,
size_t idx,
uint32_t * bit_offset_ptr )
overridevirtual

◆ GetDirectNestedTypeWithName()

CompilerType TypeSystemClang::GetDirectNestedTypeWithName ( lldb::opaque_compiler_type_t type,
llvm::StringRef name )
overridevirtual

◆ getDisplayName()

llvm::StringRef lldb_private::TypeSystemClang::getDisplayName ( ) const
inline

Returns the display name of this TypeSystemClang that indicates what purpose it serves in LLDB.

Used for example in logs.

Definition at line 164 of file TypeSystemClang.h.

References m_display_name.

Referenced by LogCreation().

◆ GetDisplayTypeName()

ConstString TypeSystemClang::GetDisplayTypeName ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3840 of file TypeSystemClang.cpp.

References getASTContext(), and GetQualType().

Referenced by GetNumChildren().

◆ GetDWARFParser()

DWARFASTParser * TypeSystemClang::GetDWARFParser ( )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9026 of file TypeSystemClang.cpp.

References m_dwarf_ast_parser_up.

◆ GetEncoding()

◆ GetEnumerationIntegerType() [1/2]

CompilerType TypeSystemClang::GetEnumerationIntegerType ( CompilerType type)

Returns the underlying integer type for an enum type.

If the given type is invalid or not an enum-type, the function returns an invalid CompilerType.

Definition at line 8496 of file TypeSystemClang.cpp.

References lldb_private::ClangUtil::GetQualType(), and GetType().

◆ GetEnumerationIntegerType() [2/2]

CompilerType TypeSystemClang::GetEnumerationIntegerType ( lldb::opaque_compiler_type_t type)
overridevirtual

◆ GetFieldAtIndex()

CompilerType TypeSystemClang::GetFieldAtIndex ( lldb::opaque_compiler_type_t type,
size_t idx,
std::string & name,
uint64_t * bit_offset_ptr,
uint32_t * bitfield_bit_size_ptr,
bool * is_bitfield_ptr )
overridevirtual

◆ GetFloatTypeFromBitSize()

CompilerType lldb_private::TypeSystemClang::GetFloatTypeFromBitSize ( clang::ASTContext * ast,
size_t bit_size )
static

◆ GetFloatTypeSemantics()

const llvm::fltSemantics & TypeSystemClang::GetFloatTypeSemantics ( size_t byte_size,
lldb::Format format )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4743 of file TypeSystemClang.cpp.

References lldb::eFormatFloat128, and getASTContext().

◆ GetFormat()

◆ GetFullyUnqualifiedType()

CompilerType TypeSystemClang::GetFullyUnqualifiedType ( lldb::opaque_compiler_type_t type)
overridevirtual

◆ GetFunctionArgumentAtIndex()

CompilerType TypeSystemClang::GetFunctionArgumentAtIndex ( lldb::opaque_compiler_type_t type,
const size_t index )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3179 of file TypeSystemClang.cpp.

References GetQualType().

◆ GetFunctionArgumentCount()

int TypeSystemClang::GetFunctionArgumentCount ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4365 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ GetFunctionArgumentTypeAtIndex()

CompilerType TypeSystemClang::GetFunctionArgumentTypeAtIndex ( lldb::opaque_compiler_type_t type,
size_t idx )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4376 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ GetFunctionReturnType()

CompilerType TypeSystemClang::GetFunctionReturnType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4391 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ GetIndexForRecordBase()

uint32_t TypeSystemClang::GetIndexForRecordBase ( const clang::RecordDecl * record_decl,
const clang::CXXBaseSpecifier * base_spec,
bool omit_empty_base_classes )

Definition at line 6658 of file TypeSystemClang.cpp.

References BaseSpecifierIsEmpty(), and UINT32_MAX.

Referenced by GetIndexOfChildMemberWithName().

◆ GetIndexForRecordChild()

uint32_t TypeSystemClang::GetIndexForRecordChild ( const clang::RecordDecl * record_decl,
clang::NamedDecl * canonical_decl,
bool omit_empty_base_classes )

Definition at line 6686 of file TypeSystemClang.cpp.

References GetNumBaseClasses(), and UINT32_MAX.

Referenced by GetIndexOfChildMemberWithName().

◆ GetIndexOfChildMemberWithName()

size_t TypeSystemClang::GetIndexOfChildMemberWithName ( lldb::opaque_compiler_type_t type,
llvm::StringRef name,
bool omit_empty_base_classes,
std::vector< uint32_t > & child_indexes )
overridevirtual

◆ GetIndexOfChildWithName()

◆ GetIntegralTemplateArgument()

std::optional< CompilerType::IntegralTemplateArgument > TypeSystemClang::GetIntegralTemplateArgument ( lldb::opaque_compiler_type_t type,
size_t idx,
bool expand_pack )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 7279 of file TypeSystemClang.cpp.

References GetAsTemplateSpecialization(), GetNthTemplateArgument(), and GetType().

◆ GetIntTypeFromBitSize()

CompilerType TypeSystemClang::GetIntTypeFromBitSize ( size_t bit_size,
bool is_signed )

Definition at line 2361 of file TypeSystemClang.cpp.

References getASTContext(), and GetType().

Referenced by GetPointerSizedIntType().

◆ GetLangOpts()

clang::LangOptions * lldb_private::TypeSystemClang::GetLangOpts ( ) const
inline

Definition at line 1160 of file TypeSystemClang.h.

References m_language_options_up.

◆ GetLValueReferenceType()

CompilerType TypeSystemClang::GetLValueReferenceType ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4600 of file TypeSystemClang.cpp.

References getASTContext(), GetQualType(), and GetType().

◆ getMangleContext()

clang::MangleContext * TypeSystemClang::getMangleContext ( )

Definition at line 716 of file TypeSystemClang.cpp.

References getASTContext(), and m_mangle_ctx_up.

Referenced by DeclGetMangledName().

◆ GetMemberFunctionAtIndex()

◆ GetMetadata() [1/2]

◆ GetMetadata() [2/2]

std::optional< ClangASTMetadata > TypeSystemClang::GetMetadata ( const clang::Type * object)

Definition at line 2525 of file TypeSystemClang.cpp.

References m_type_metadata.

◆ GetMinimumLanguage()

◆ GetNativePDBParser()

npdb::PdbAstBuilder * TypeSystemClang::GetNativePDBParser ( )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9038 of file TypeSystemClang.cpp.

References m_native_pdb_ast_parser_up.

◆ GetNonReferenceType()

CompilerType TypeSystemClang::GetNonReferenceType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4567 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ GetNumBaseClasses()

uint32_t TypeSystemClang::GetNumBaseClasses ( const clang::CXXRecordDecl * cxx_record_decl,
bool omit_empty_base_classes )

◆ GetNumberOfFunctionArguments()

size_t TypeSystemClang::GetNumberOfFunctionArguments ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3166 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ GetNumChildren()

◆ GetNumDirectBaseClasses()

uint32_t TypeSystemClang::GetNumDirectBaseClasses ( lldb::opaque_compiler_type_t type)
overridevirtual

◆ GetNumFields()

uint32_t TypeSystemClang::GetNumFields ( lldb::opaque_compiler_type_t type)
overridevirtual

◆ GetNumMemberFunctions()

size_t TypeSystemClang::GetNumMemberFunctions ( lldb::opaque_compiler_type_t type)
overridevirtual

◆ GetNumPointeeChildren()

uint32_t TypeSystemClang::GetNumPointeeChildren ( clang::QualType type)
static

Definition at line 6048 of file TypeSystemClang.cpp.

References RemoveWrappingTypes().

Referenced by GetNumChildren().

◆ GetNumTemplateArguments()

size_t TypeSystemClang::GetNumTemplateArguments ( lldb::opaque_compiler_type_t type,
bool expand_pack )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 7122 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), GetCompleteType(), and RemoveWrappingTypes().

◆ GetNumVirtualBaseClasses()

uint32_t TypeSystemClang::GetNumVirtualBaseClasses ( lldb::opaque_compiler_type_t type)
overridevirtual

◆ GetObjCBitSize()

llvm::Expected< uint64_t > TypeSystemClang::GetObjCBitSize ( clang::QualType qual_type,
ExecutionContextScope * exe_scope )
private

◆ GetOpaqueCompilerType()

◆ GetOrCreateClangModule()

OptionalClangModuleID TypeSystemClang::GetOrCreateClangModule ( llvm::StringRef name,
OptionalClangModuleID parent,
bool is_framework = false,
bool is_explicit = false )

◆ GetOrCreateStructForIdentifier()

CompilerType TypeSystemClang::GetOrCreateStructForIdentifier ( llvm::StringRef type_name,
const std::initializer_list< std::pair< const char *, CompilerType > > & type_fields,
bool packed = false )

◆ GetPDBParser()

◆ GetPluginName()

llvm::StringRef lldb_private::TypeSystemClang::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 146 of file TypeSystemClang.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

llvm::StringRef lldb_private::TypeSystemClang::GetPluginNameStatic ( )
inlinestatic

Definition at line 148 of file TypeSystemClang.h.

Referenced by GetPluginName(), and Initialize().

◆ GetPointeeType()

◆ GetPointerByteSize()

uint32_t TypeSystemClang::GetPointerByteSize ( )
overridevirtual

◆ GetPointerSizedIntType()

CompilerType TypeSystemClang::GetPointerSizedIntType ( bool is_signed)

Definition at line 2408 of file TypeSystemClang.cpp.

References getASTContext(), and GetIntTypeFromBitSize().

◆ GetPointerType()

CompilerType TypeSystemClang::GetPointerType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4583 of file TypeSystemClang.cpp.

References getASTContext(), GetQualType(), and GetType().

Referenced by GetPointerByteSize().

◆ GetPtrAuthAddressDiversity()

bool TypeSystemClang::GetPtrAuthAddressDiversity ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3064 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ GetPtrAuthDiscriminator()

unsigned TypeSystemClang::GetPtrAuthDiscriminator ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3055 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ GetPtrAuthKey()

unsigned TypeSystemClang::GetPtrAuthKey ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3045 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ GetQualType()

◆ GetRValueReferenceType()

CompilerType TypeSystemClang::GetRValueReferenceType ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 4608 of file TypeSystemClang.cpp.

References getASTContext(), GetQualType(), and GetType().

◆ getSema()

clang::Sema * lldb_private::TypeSystemClang::getSema ( )
inline

Definition at line 176 of file TypeSystemClang.h.

References m_sema.

◆ GetSourceMgr()

clang::SourceManager * lldb_private::TypeSystemClang::GetSourceMgr ( ) const
inline

Definition at line 1163 of file TypeSystemClang.h.

References m_source_manager_up.

◆ GetStaticFieldWithName()

CompilerDecl TypeSystemClang::GetStaticFieldWithName ( lldb::opaque_compiler_type_t type,
llvm::StringRef name )
overridevirtual

◆ GetSupportedLanguagesForExpressions()

◆ GetSupportedLanguagesForTypes()

◆ getTargetInfo()

TargetInfo * TypeSystemClang::getTargetInfo ( )

◆ getTargetOptions()

std::shared_ptr< clang::TargetOptions > & TypeSystemClang::getTargetOptions ( )

Definition at line 722 of file TypeSystemClang.cpp.

References m_target_options_rp, and m_target_triple.

Referenced by getTargetInfo().

◆ GetTargetTriple()

const char * TypeSystemClang::GetTargetTriple ( )

Definition at line 611 of file TypeSystemClang.cpp.

References m_target_triple.

Referenced by CreateASTContext().

◆ GetTemplateArgumentKind()

◆ GetTranslationUnitDecl()

clang::TranslationUnitDecl * lldb_private::TypeSystemClang::GetTranslationUnitDecl ( )
inline

Definition at line 230 of file TypeSystemClang.h.

References getASTContext().

◆ GetType()

CompilerType lldb_private::TypeSystemClang::GetType ( clang::QualType qt)
inline

Creates a CompilerType from the given QualType with the current TypeSystemClang instance as the CompilerType's typesystem.

Parameters
qtThe QualType for a type that belongs to the ASTContext of this TypeSystemClang.
Returns
The CompilerType representing the given QualType. If the QualType's type pointer is a nullptr then the function returns an invalid CompilerType.

Definition at line 244 of file TypeSystemClang.h.

References getASTContext().

Referenced by AddConstModifier(), AddPtrAuthModifier(), AddRestrictModifier(), AddVolatileModifier(), lldb_private::AppleObjCTypeEncodingParser::BuildAggregate(), CreateArrayType(), CreateBlockPointerType(), CreateClassTemplateSpecializationType(), CreateEnumerationType(), CreateFunctionType(), CreateGenericFunctionPrototype(), CreateObjCClass(), CreateParameterDeclarations(), CreateRecordType(), CreateTypedef(), DeclGetFunctionArgumentType(), DeclGetFunctionReturnType(), DumpTypeValue(), ForEachEnumerator(), GetArrayElementType(), GetArrayType(), GetAtomicType(), GetBuiltinTypeForDWARFEncodingAndBitSize(), GetBuiltinTypeForEncodingAndBitSize(), GetCanonicalType(), GetChildCompilerTypeAtIndex(), GetCStringType(), GetDirectBaseClassAtIndex(), GetDirectNestedTypeWithName(), GetEncoding(), GetEnumerationIntegerType(), GetEnumerationIntegerType(), GetFieldAtIndex(), GetFullyUnqualifiedType(), GetFunctionArgumentTypeAtIndex(), GetFunctionReturnType(), GetIndexOfChildMemberWithName(), GetIndexOfChildWithName(), GetIntegralTemplateArgument(), GetIntTypeFromBitSize(), GetLValueReferenceType(), GetMemberFunctionAtIndex(), GetMinimumLanguage(), GetNonReferenceType(), GetNumChildren(), GetObjCBitSize(), GetPointeeType(), GetPointerType(), GetRValueReferenceType(), GetTypedefedType(), GetTypeForDecl(), GetTypeInfo(), GetTypeTemplateArgument(), GetVirtualBaseClassAtIndex(), IsPossibleDynamicType(), IsVectorType(), and lldb_private::AppleObjCTypeEncodingParser::RealizeType().

◆ GetTypeBitAlign()

std::optional< size_t > TypeSystemClang::GetTypeBitAlign ( lldb::opaque_compiler_type_t type,
ExecutionContextScope * exe_scope )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4836 of file TypeSystemClang.cpp.

References getASTContext(), GetCompleteType(), and GetQualType().

◆ GetTypeClass()

lldb::TypeClass TypeSystemClang::GetTypeClass ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4140 of file TypeSystemClang.cpp.

References GetQualType(), and RemoveWrappingTypes().

◆ GetTypedefedType()

CompilerType TypeSystemClang::GetTypedefedType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4710 of file TypeSystemClang.cpp.

References GetQualType(), GetType(), and RemoveWrappingTypes().

◆ GetTypeForDecl() [1/5]

CompilerType TypeSystemClang::GetTypeForDecl ( clang::NamedDecl * decl)

◆ GetTypeForDecl() [2/5]

CompilerType lldb_private::TypeSystemClang::GetTypeForDecl ( clang::ObjCInterfaceDecl * objc_decl)

◆ GetTypeForDecl() [3/5]

CompilerType lldb_private::TypeSystemClang::GetTypeForDecl ( clang::TagDecl * decl)

◆ GetTypeForDecl() [4/5]

CompilerType TypeSystemClang::GetTypeForDecl ( clang::ValueDecl * value_decl)

Definition at line 1190 of file TypeSystemClang.cpp.

References GetType().

◆ GetTypeForDecl() [5/5]

CompilerType TypeSystemClang::GetTypeForDecl ( void * opaque_decl)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 1155 of file TypeSystemClang.cpp.

References GetTypeForDecl().

◆ GetTypeForFormatters()

CompilerType TypeSystemClang::GetTypeForFormatters ( void * type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 7310 of file TypeSystemClang.cpp.

References lldb_private::ClangUtil::RemoveFastQualifiers().

◆ GetTypeForIdentifier()

template<typename RecordDeclType>
CompilerType lldb_private::TypeSystemClang::GetTypeForIdentifier ( const clang::ASTContext & Ctx,
llvm::StringRef type_name,
clang::DeclContext * decl_context = nullptr )
inline

Definition at line 263 of file TypeSystemClang.h.

References getASTContext().

Referenced by CreateStructForIdentifier(), and GetOrCreateStructForIdentifier().

◆ GetTypeInfo()

◆ GetTypeName()

ConstString TypeSystemClang::GetTypeName ( lldb::opaque_compiler_type_t type,
bool base_only )
overridevirtual

◆ GetTypeNameForDecl()

std::string TypeSystemClang::GetTypeNameForDecl ( const clang::NamedDecl * named_decl,
bool qualified = true )
private

Returns the internal type name for the given NamedDecl using the type printing policy.

Definition at line 2140 of file TypeSystemClang.cpp.

References GetTypePrintingPolicy().

Referenced by DeclContextGetScopeQualifiedName(), DeclGetName(), DumpTypeDescription(), and GetTypeName().

◆ GetTypePrintingPolicy()

PrintingPolicy TypeSystemClang::GetTypePrintingPolicy ( )
private

Returns the PrintingPolicy used when generating the internal type names.

These type names are mostly used for the formatter selection.

Definition at line 2118 of file TypeSystemClang.cpp.

References getASTContext().

Referenced by DeclContextGetName(), GetTypeName(), and GetTypeNameForDecl().

◆ GetTypeQualifiers()

unsigned TypeSystemClang::GetTypeQualifiers ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4282 of file TypeSystemClang.cpp.

References GetQualType().

◆ GetTypeTemplateArgument()

CompilerType TypeSystemClang::GetTypeTemplateArgument ( lldb::opaque_compiler_type_t type,
size_t idx,
bool expand_pack )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 7264 of file TypeSystemClang.cpp.

References GetAsTemplateSpecialization(), GetNthTemplateArgument(), and GetType().

◆ GetUniqueNamespaceDeclaration()

NamespaceDecl * TypeSystemClang::GetUniqueNamespaceDeclaration ( const char * name,
clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
bool is_inline = false )

Definition at line 1864 of file TypeSystemClang.cpp.

References getASTContext(), and SetOwningModule().

◆ GetVirtualBaseClassAtIndex()

CompilerType TypeSystemClang::GetVirtualBaseClassAtIndex ( lldb::opaque_compiler_type_t type,
size_t idx,
uint32_t * bit_offset_ptr )
overridevirtual

◆ Initialize()

◆ isA()

bool lldb_private::TypeSystemClang::isA ( const void * ClassID) const
inlineoverridevirtual

Implements lldb_private::TypeSystem.

Definition at line 121 of file TypeSystemClang.h.

References ID.

Referenced by lldb_private::ScratchTypeSystemClang::isA().

◆ IsAggregateType()

bool TypeSystemClang::IsAggregateType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 2832 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and RemoveWrappingTypes().

Referenced by DumpTypeValue().

◆ IsAnonymousType()

bool TypeSystemClang::IsAnonymousType ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 2853 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and RemoveWrappingTypes().

◆ IsArrayType()

bool TypeSystemClang::IsArrayType ( lldb::opaque_compiler_type_t type,
CompilerType * element_type,
uint64_t * size,
bool * is_incomplete )
overridevirtual

◆ IsBeingDefined()

bool TypeSystemClang::IsBeingDefined ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3759 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsBlockPointerType()

bool TypeSystemClang::IsBlockPointerType ( lldb::opaque_compiler_type_t type,
CompilerType * function_pointer_type_ptr )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3236 of file TypeSystemClang.cpp.

References IsTypeImpl(), and m_ast_up.

◆ IsCharType()

bool TypeSystemClang::IsCharType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3001 of file TypeSystemClang.cpp.

References GetQualType().

◆ IsClassType()

bool TypeSystemClang::IsClassType ( lldb::opaque_compiler_type_t type)
static

Definition at line 3548 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsCompleteType()

bool TypeSystemClang::IsCompleteType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3005 of file TypeSystemClang.cpp.

References getASTContext(), GetCompleteQualType(), and GetQualType().

◆ IsConst()

bool TypeSystemClang::IsConst ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3016 of file TypeSystemClang.cpp.

References GetQualType().

◆ IsCStringType()

◆ IsCXXClassType()

◆ IsDefined()

bool TypeSystemClang::IsDefined ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3504 of file TypeSystemClang.cpp.

References GetQualType().

◆ IsEnumerationType()

bool TypeSystemClang::IsEnumerationType ( lldb::opaque_compiler_type_t type,
bool & is_signed )
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 3277 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and IsIntegerType().

◆ IsEnumType()

bool TypeSystemClang::IsEnumType ( lldb::opaque_compiler_type_t type)
static

Definition at line 3556 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsFloatingPointType()

bool TypeSystemClang::IsFloatingPointType ( lldb::opaque_compiler_type_t type,
uint32_t & count,
bool & is_complex )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3466 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and IsFloatingPointType().

Referenced by IsFloatingPointType().

◆ IsForcefullyCompleted()

bool TypeSystemClang::IsForcefullyCompleted ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9800 of file TypeSystemClang.cpp.

References GetMetadata(), and GetQualType().

◆ IsFunctionPointerType()

bool TypeSystemClang::IsFunctionPointerType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3228 of file TypeSystemClang.cpp.

References IsTypeImpl().

◆ IsFunctionType()

bool TypeSystemClang::IsFunctionType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3074 of file TypeSystemClang.cpp.

References IsTypeImpl().

◆ IsHomogeneousAggregate()

uint32_t TypeSystemClang::IsHomogeneousAggregate ( lldb::opaque_compiler_type_t type,
CompilerType * base_type_ptr )
overridevirtual

◆ IsIntegerType()

bool TypeSystemClang::IsIntegerType ( lldb::opaque_compiler_type_t type,
bool & is_signed )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3258 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

Referenced by IsEnumerationType().

◆ IsMemberFunctionPointerType()

bool TypeSystemClang::IsMemberFunctionPointerType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3219 of file TypeSystemClang.cpp.

References IsTypeImpl().

◆ IsObjCClassType()

◆ IsObjCObjectOrInterfaceType()

◆ IsObjCObjectPointerType()

◆ IsOperator()

bool TypeSystemClang::IsOperator ( llvm::StringRef name,
clang::OverloadedOperatorKind & op_kind )
static

◆ IsPointerOrReferenceType()

bool TypeSystemClang::IsPointerOrReferenceType ( lldb::opaque_compiler_type_t type,
CompilerType * pointee_type )
overridevirtual

◆ IsPointerType()

bool TypeSystemClang::IsPointerType ( lldb::opaque_compiler_type_t type,
CompilerType * pointee_type )
overridevirtual

◆ IsPolymorphicClass()

bool TypeSystemClang::IsPolymorphicClass ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3564 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and GetCompleteType().

◆ IsPossibleDynamicType()

bool TypeSystemClang::IsPossibleDynamicType ( lldb::opaque_compiler_type_t type,
CompilerType * target_type,
bool check_cplusplus,
bool check_objc )
overridevirtual

◆ IsReferenceType()

bool TypeSystemClang::IsReferenceType ( lldb::opaque_compiler_type_t type,
CompilerType * pointee_type,
bool * is_rvalue )
overridevirtual

◆ IsRuntimeGeneratedType()

bool TypeSystemClang::IsRuntimeGeneratedType ( lldb::opaque_compiler_type_t type)
overridevirtual

This is used by swift.

Implements lldb_private::TypeSystem.

Definition at line 2982 of file TypeSystemClang.cpp.

References GetDeclContextForType(), GetMetadata(), and GetQualType().

◆ IsScalarType()

bool TypeSystemClang::IsScalarType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3703 of file TypeSystemClang.cpp.

References GetTypeInfo().

◆ IsScopedEnumerationType()

bool TypeSystemClang::IsScopedEnumerationType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3296 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsTemplateType()

bool TypeSystemClang::IsTemplateType ( lldb::opaque_compiler_type_t type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 7110 of file TypeSystemClang.cpp.

References lldb_private::ClangUtil::GetQualType().

◆ IsTypedefType()

bool TypeSystemClang::IsTypedefType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3710 of file TypeSystemClang.cpp.

References GetQualType(), and RemoveWrappingTypes().

◆ IsTypeImpl()

bool TypeSystemClang::IsTypeImpl ( lldb::opaque_compiler_type_t type,
llvm::function_ref< bool(clang::QualType)> predicate ) const
private

◆ IsVectorType()

bool TypeSystemClang::IsVectorType ( lldb::opaque_compiler_type_t type,
CompilerType * element_type,
uint64_t * size )
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 2946 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and GetType().

◆ IsVoidType()

bool TypeSystemClang::IsVoidType ( lldb::opaque_compiler_type_t type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3717 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ LayoutRecordType()

bool TypeSystemClang::LayoutRecordType ( const clang::RecordDecl * record_decl,
uint64_t & size,
uint64_t & alignment,
llvm::DenseMap< const clang::FieldDecl *, uint64_t > & field_offsets,
llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > & base_offsets,
llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > & vbase_offsets )

◆ LogCreation()

void TypeSystemClang::LogCreation ( ) const
private

Emits information about this TypeSystem into the expression log.

Helper method that is used in TypeSystemClang::TypeSystemClang on creation of a new instance.

Definition at line 9828 of file TypeSystemClang.cpp.

References lldb_private::Expressions, getASTContext(), getDisplayName(), lldb_private::GetLog(), and LLDB_LOG.

Referenced by TypeSystemClang().

◆ operator=()

const TypeSystemClang & lldb_private::TypeSystemClang::operator= ( const TypeSystemClang & )
private

References TypeSystemClang().

◆ ParseClassTemplateDecl()

clang::ClassTemplateDecl * TypeSystemClang::ParseClassTemplateDecl ( clang::DeclContext * decl_ctx,
OptionalClangModuleID owning_module,
lldb::AccessType access_type,
const char * parent_name,
int tag_decl_kind,
const TypeSystemClang::TemplateParameterInfos & template_param_infos )

◆ RecordHasFields()

bool TypeSystemClang::RecordHasFields ( const clang::RecordDecl * record_decl)

◆ RequireCompleteType()

void TypeSystemClang::RequireCompleteType ( CompilerType type)
static

◆ SetCXXRecordDeclAccess()

void TypeSystemClang::SetCXXRecordDeclAccess ( const clang::CXXRecordDecl * object,
clang::AccessSpecifier access )

Definition at line 2533 of file TypeSystemClang.cpp.

References m_cxx_record_decl_access.

Referenced by AddMethodToCXXRecordType().

◆ SetDeclIsForcefullyCompleted()

bool TypeSystemClang::SetDeclIsForcefullyCompleted ( const clang::TagDecl * td)

◆ SetExternalSource()

void TypeSystemClang::SetExternalSource ( llvm::IntrusiveRefCntPtr< clang::ExternalASTSource > ast_source_sp)

◆ SetFloatingInitializerForVariable()

void TypeSystemClang::SetFloatingInitializerForVariable ( clang::VarDecl * var,
const llvm::APFloat & init_value )
static

Initializes a variable with a floating point value.

Parameters
varThe variable to initialize. Must not already have an initializer and must have a floating point type.
init_valueThe float value that the variable should be initialized to.

Definition at line 7653 of file TypeSystemClang.cpp.

Referenced by PDBASTParser::AddRecordMembers().

◆ SetHasExternalStorage()

◆ SetIntegerInitializerForVariable()

void TypeSystemClang::SetIntegerInitializerForVariable ( clang::VarDecl * var,
const llvm::APInt & init_value )
static

Initializes a variable with an integer value.

Parameters
varThe variable to initialize. Must not already have an initializer and must have an integer or enum type.
init_valueThe integer value that the variable should be initialized to. Has to match the bit width of the variable type.

Definition at line 7627 of file TypeSystemClang.cpp.

Referenced by PDBASTParser::AddRecordMembers(), and DWARFASTParserClang::CreateStaticMemberVariable().

◆ SetIsPacked()

void TypeSystemClang::SetIsPacked ( const CompilerType & type)
static

◆ SetMetadata() [1/2]

void TypeSystemClang::SetMetadata ( const clang::Decl * object,
ClangASTMetadata meta_data )

◆ SetMetadata() [2/2]

void TypeSystemClang::SetMetadata ( const clang::Type * object,
ClangASTMetadata meta_data )

Definition at line 2510 of file TypeSystemClang.cpp.

References m_type_metadata.

◆ SetMetadataAsUserID() [1/2]

void TypeSystemClang::SetMetadataAsUserID ( const clang::Decl * decl,
lldb::user_id_t user_id )

◆ SetMetadataAsUserID() [2/2]

void TypeSystemClang::SetMetadataAsUserID ( const clang::Type * type,
lldb::user_id_t user_id )

◆ SetObjCSuperClass()

bool TypeSystemClang::SetObjCSuperClass ( const CompilerType & type,
const CompilerType & superclass_compiler_type )
static

◆ SetOwningModule()

◆ setSema()

void TypeSystemClang::setSema ( clang::Sema * s)

Definition at line 605 of file TypeSystemClang.cpp.

References m_ast_up, and m_sema.

◆ SetTargetTriple()

void TypeSystemClang::SetTargetTriple ( llvm::StringRef target_triple)
private

Definition at line 615 of file TypeSystemClang.cpp.

References m_target_triple.

Referenced by TypeSystemClang().

◆ StartTagDeclarationDefinition()

◆ SupportsLanguage()

bool TypeSystemClang::SupportsLanguage ( lldb::LanguageType language)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3731 of file TypeSystemClang.cpp.

◆ Terminate()

void TypeSystemClang::Terminate ( )
static

◆ TransferBaseClasses()

bool TypeSystemClang::TransferBaseClasses ( lldb::opaque_compiler_type_t type,
std::vector< std::unique_ptr< clang::CXXBaseSpecifier > > bases )

Definition at line 7899 of file TypeSystemClang.cpp.

References GetAsCXXRecordDecl().

◆ UnifyAccessSpecifiers()

clang::AccessSpecifier TypeSystemClang::UnifyAccessSpecifiers ( clang::AccessSpecifier lhs,
clang::AccessSpecifier rhs )
static

Definition at line 1749 of file TypeSystemClang.cpp.

Referenced by BuildIndirectFields().

◆ Verify()

bool TypeSystemClang::Verify ( lldb::opaque_compiler_type_t type)
overridevirtual

Verify the integrity of the type to catch CompilerTypes that mix and match invalid TypeSystem/Opaque type pairs.

Implements lldb_private::TypeSystem.

Definition at line 2827 of file TypeSystemClang.cpp.

References GetQualType().

Member Data Documentation

◆ ID

char TypeSystemClang::ID
staticprivate

Definition at line 113 of file TypeSystemClang.h.

Referenced by classof(), and isA().

◆ m_ast_owned

bool lldb_private::TypeSystemClang::m_ast_owned = false
private

Definition at line 1221 of file TypeSystemClang.h.

Referenced by CreateASTContext(), and Finalize().

◆ m_ast_up

std::unique_ptr<clang::ASTContext> lldb_private::TypeSystemClang::m_ast_up
private

◆ m_builtins_up

std::unique_ptr<clang::Builtin::Context> lldb_private::TypeSystemClang::m_builtins_up
private

Definition at line 1212 of file TypeSystemClang.h.

Referenced by CreateASTContext(), and Finalize().

◆ m_cxx_record_decl_access

CXXRecordDeclAccessMap lldb_private::TypeSystemClang::m_cxx_record_decl_access
private

Maps CXXRecordDecl to their most recent added method/field's AccessSpecifier.

Definition at line 1239 of file TypeSystemClang.h.

Referenced by GetCXXRecordDeclAccess(), and SetCXXRecordDeclAccess().

◆ m_decl_metadata

DeclMetadataMap lldb_private::TypeSystemClang::m_decl_metadata
private

Maps Decls to their associated ClangASTMetadata.

Definition at line 1229 of file TypeSystemClang.h.

Referenced by GetMetadata(), and SetMetadata().

◆ m_diagnostic_consumer_up

std::unique_ptr<clang::DiagnosticConsumer> lldb_private::TypeSystemClang::m_diagnostic_consumer_up
private

Definition at line 1207 of file TypeSystemClang.h.

Referenced by CreateASTContext().

◆ m_diagnostic_options_up

std::unique_ptr<clang::DiagnosticOptions> lldb_private::TypeSystemClang::m_diagnostic_options_up
private

Definition at line 1205 of file TypeSystemClang.h.

Referenced by CreateASTContext().

◆ m_diagnostics_engine_up

std::unique_ptr<clang::DiagnosticsEngine> lldb_private::TypeSystemClang::m_diagnostics_engine_up
private

Definition at line 1206 of file TypeSystemClang.h.

Referenced by CreateASTContext(), Finalize(), and GetOrCreateClangModule().

◆ m_display_name

std::string lldb_private::TypeSystemClang::m_display_name
private

A string describing what this TypeSystemClang represents (e.g., AST for debug information, an expression, some other utility ClangAST).

Useful for logging and debugging.

Definition at line 1225 of file TypeSystemClang.h.

Referenced by getDisplayName(), and TypeSystemClang().

◆ m_dwarf_ast_parser_up

std::unique_ptr<DWARFASTParserClang> lldb_private::TypeSystemClang::m_dwarf_ast_parser_up
private

Definition at line 1216 of file TypeSystemClang.h.

Referenced by GetDWARFParser(), and LayoutRecordType().

◆ m_file_manager_up

std::unique_ptr<clang::FileManager> lldb_private::TypeSystemClang::m_file_manager_up
private

Definition at line 1203 of file TypeSystemClang.h.

Referenced by CreateASTContext().

◆ m_header_search_opts_up

std::unique_ptr<clang::HeaderSearchOptions> lldb_private::TypeSystemClang::m_header_search_opts_up
private

Definition at line 1213 of file TypeSystemClang.h.

Referenced by GetOrCreateClangModule().

◆ m_header_search_up

std::unique_ptr<clang::HeaderSearch> lldb_private::TypeSystemClang::m_header_search_up
private

Definition at line 1214 of file TypeSystemClang.h.

Referenced by GetOrCreateClangModule().

◆ m_identifier_table_up

std::unique_ptr<clang::IdentifierTable> lldb_private::TypeSystemClang::m_identifier_table_up
private

Definition at line 1210 of file TypeSystemClang.h.

Referenced by CreateASTContext(), and Finalize().

◆ m_language_options_up

std::unique_ptr<clang::LangOptions> lldb_private::TypeSystemClang::m_language_options_up
private

◆ m_mangle_ctx_up

std::unique_ptr<clang::MangleContext> lldb_private::TypeSystemClang::m_mangle_ctx_up
private

Definition at line 1219 of file TypeSystemClang.h.

Referenced by getMangleContext().

◆ m_module_map_up

std::unique_ptr<clang::ModuleMap> lldb_private::TypeSystemClang::m_module_map_up
private

Definition at line 1215 of file TypeSystemClang.h.

Referenced by GetOrCreateClangModule().

◆ m_native_pdb_ast_parser_up

std::unique_ptr<npdb::PdbAstBuilder> lldb_private::TypeSystemClang::m_native_pdb_ast_parser_up
private

Definition at line 1218 of file TypeSystemClang.h.

Referenced by GetNativePDBParser(), and LayoutRecordType().

◆ m_pdb_ast_parser_up

std::unique_ptr<PDBASTParser> lldb_private::TypeSystemClang::m_pdb_ast_parser_up
private

Definition at line 1217 of file TypeSystemClang.h.

Referenced by GetPDBParser(), and LayoutRecordType().

◆ m_pointer_byte_size

uint32_t lldb_private::TypeSystemClang::m_pointer_byte_size = 0
private

Definition at line 1220 of file TypeSystemClang.h.

Referenced by GetPointerByteSize().

◆ m_selector_table_up

std::unique_ptr<clang::SelectorTable> lldb_private::TypeSystemClang::m_selector_table_up
private

Definition at line 1211 of file TypeSystemClang.h.

Referenced by CreateASTContext(), and Finalize().

◆ m_sema

clang::Sema* lldb_private::TypeSystemClang::m_sema = nullptr
private

The sema associated that is currently used to build this ASTContext.

May be null if we are already done parsing this ASTContext or the ASTContext wasn't created by parsing source code.

Definition at line 1244 of file TypeSystemClang.h.

Referenced by getSema(), and setSema().

◆ m_source_manager_up

std::unique_ptr<clang::SourceManager> lldb_private::TypeSystemClang::m_source_manager_up
private

◆ m_target_info_up

std::unique_ptr<clang::TargetInfo> lldb_private::TypeSystemClang::m_target_info_up
private

Definition at line 1209 of file TypeSystemClang.h.

Referenced by Finalize(), GetOrCreateClangModule(), and getTargetInfo().

◆ m_target_options_rp

std::shared_ptr<clang::TargetOptions> lldb_private::TypeSystemClang::m_target_options_rp
private

Definition at line 1208 of file TypeSystemClang.h.

Referenced by Finalize(), and getTargetOptions().

◆ m_target_triple

std::string lldb_private::TypeSystemClang::m_target_triple
private

◆ m_type_metadata

TypeMetadataMap lldb_private::TypeSystemClang::m_type_metadata
private

Maps Types to their associated ClangASTMetadata.

Definition at line 1233 of file TypeSystemClang.h.

Referenced by GetMetadata(), and SetMetadata().


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