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

A TypeSystem implementation based on Clang. More...

#include <TypeSystemClang.h>

Inheritance diagram for lldb_private::TypeSystemClang:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::TypeSystemClang:
Collaboration graph
[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. More...
 
 TypeSystemClang (llvm::StringRef name, clang::ASTContext &existing_ctxt)
 Constructs a TypeSystemClang that uses an existing ASTContext internally. More...
 
 ~TypeSystemClang () override
 
void Finalize () override
 
ConstString GetPluginName () override
 
llvm::StringRef getDisplayName () const
 Returns the display name of this TypeSystemClang that indicates what purpose it serves in LLDB. More...
 
clang::ASTContext & getASTContext ()
 Returns the clang::ASTContext instance managed by this TypeSystemClang. More...
 
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_up)
 
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)
 
ClangASTMetadataGetMetadata (const clang::Decl *object)
 
ClangASTMetadataGetMetadata (const clang::Type *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)
 
uint32_t GetPointerByteSize () override
 
clang::TranslationUnitDecl * GetTranslationUnitDecl ()
 
CompilerType GetType (clang::QualType qt)
 Creates a CompilerType form the given QualType with the current TypeSystemClang instance as the CompilerType's typesystem. More...
 
CompilerType GetTypeForDecl (clang::NamedDecl *decl)
 
CompilerType GetTypeForDecl (clang::TagDecl *decl)
 
CompilerType GetTypeForDecl (clang::ObjCInterfaceDecl *objc_decl)
 
template<typename RecordDeclType >
CompilerType GetTypeForIdentifier (ConstString type_name, clang::DeclContext *decl_context=nullptr)
 
CompilerType CreateStructForIdentifier (ConstString type_name, const std::initializer_list< std::pair< const char *, CompilerType >> &type_fields, bool packed=false)
 
CompilerType GetOrCreateStructForIdentifier (ConstString type_name, const std::initializer_list< std::pair< const char *, CompilerType >> &type_fields, bool packed=false)
 
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. More...
 
CompilerType CreateRecordType (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, lldb::AccessType access_type, llvm::StringRef name, int kind, lldb::LanguageType language, ClangASTMetadata *metadata=nullptr, 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, const char *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)
 
CompilerType CreateObjCClass (llvm::StringRef name, clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, bool isForwardDecl, bool isInternal, ClangASTMetadata *metadata=nullptr)
 
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)
 
CompilerType CreateFunctionType (const CompilerType &result_type, const CompilerType *args, unsigned num_args, bool is_variadic, unsigned type_quals, clang::CallingConv cc=clang::CC_C)
 
clang::ParmVarDecl * CreateParameterDeclaration (clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, const char *name, const CompilerType &param_type, int storage, bool add_decl=false)
 
void SetFunctionParameters (clang::FunctionDecl *function_decl, llvm::ArrayRef< clang::ParmVarDecl * > params)
 
CompilerType CreateBlockPointerType (const CompilerType &function_type)
 
CompilerType CreateArrayType (const CompilerType &element_type, size_t element_count, bool is_vector)
 
CompilerType CreateEnumerationType (const char *name, clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, const Declaration &decl, const CompilerType &integer_qual_type, bool is_scoped)
 
CompilerType GetIntTypeFromBitSize (size_t bit_size, bool is_signed)
 
CompilerType GetPointerSizedIntType (bool is_signed)
 
DWARFASTParserGetDWARFParser () override
 
PDBASTParserGetPDBParser () 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. More...
 
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
 
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. More...
 
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, lldb::LanguageType *language_ptr, bool *is_instance_method_ptr, ConstString *language_object_name_ptr) override
 
bool DeclContextIsContainedInLookup (void *opaque_decl_ctx, void *other_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. More...
 
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) override
 
bool IsDefined (lldb::opaque_compiler_type_t type) override
 
bool IsFloatingPointType (lldb::opaque_compiler_type_t type, uint32_t &count, bool &is_complex) 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 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
 
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
 
ConstString GetTypeName (lldb::opaque_compiler_type_t type) 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 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. More...
 
CompilerType GetTypedefedType (lldb::opaque_compiler_type_t type) override
 
CompilerType GetBasicTypeFromAST (lldb::BasicType basic_type) override
 
const llvm::fltSemantics & GetFloatTypeSemantics (size_t byte_size) override
 
llvm::Optional< uint64_t > GetByteSize (lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope)
 
llvm::Optional< 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
 
llvm::Optional< size_t > GetTypeBitAlign (lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) override
 
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
 
CompilerType 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) override
 
uint32_t GetIndexOfChildWithName (lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes) override
 
size_t GetIndexOfChildMemberWithName (lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes, std::vector< uint32_t > &child_indexes) override
 
size_t GetNumTemplateArguments (lldb::opaque_compiler_type_t type) override
 
lldb::TemplateArgumentKind GetTemplateArgumentKind (lldb::opaque_compiler_type_t type, size_t idx) override
 
CompilerType GetTypeTemplateArgument (lldb::opaque_compiler_type_t type, size_t idx) override
 
llvm::Optional< CompilerType::IntegralTemplateArgumentGetIntegralTemplateArgument (lldb::opaque_compiler_type_t type, size_t idx) 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)
 
clang::CXXMethodDecl * AddMethodToCXXRecordType (lldb::opaque_compiler_type_t type, llvm::StringRef name, const char *mangled_name, 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, int64_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. More...
 
LLVM_DUMP_METHOD void dump (lldb::opaque_compiler_type_t type) const override
 Convenience LLVM-style dump method for use in the debugger only. More...
 
void Dump (Stream &s)
 
void DumpFromSymbolFile (Stream &s, llvm::StringRef symbol_name)
 Dump clang AST types from the symbol file. More...
 
void DumpValue (lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, bool show_types, bool show_summary, bool verbose, uint32_t depth) override
 
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 DumpSummary (lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size) override
 
void DumpTypeDescription (lldb::opaque_compiler_type_t type, lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) override
 Dump the type to stdout. More...
 
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. More...
 
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
 
- Public Member Functions inherited from lldb_private::TypeSystem
 ~TypeSystem () override
 
virtual SymbolFileGetSymbolFile () const
 
virtual void SetSymbolFile (SymbolFile *sym_file)
 
virtual bool ShouldTreatScalarValueAsAddress (lldb::opaque_compiler_type_t type)
 
virtual UserExpressionGetUserExpression (llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType 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)
 
- 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 ConstString 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 DeclsAreEquivalent (clang::Decl *lhs_decl, clang::Decl *rhs_decl)
 
static bool GetCompleteDecl (clang::ASTContext *ast, clang::Decl *decl)
 
static lldb::BasicType GetBasicTypeEnumeration (ConstString 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 uint32_t GetNumBaseClasses (const clang::CXXRecordDecl *cxx_record_decl, bool omit_empty_base_classes)
 
static clang::DeclContext * GetAsDeclContext (clang::FunctionDecl *function_decl)
 
static bool CheckOverloadedOperatorKindParameterCount (bool is_method, clang::OverloadedOperatorKind op_kind, uint32_t num_params)
 
static bool RecordHasFields (const clang::RecordDecl *record_decl)
 
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. More...
 
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 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 IsObjCClassTypeAndHasIVars (const CompilerType &type, bool check_superclass)
 
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 llvm::Optional< std::stringGetCXXClassName (const CompilerType &type)
 
static lldb::BasicType GetBasicTypeEnumeration (lldb::opaque_compiler_type_t type, ConstString name)
 
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. More...
 
static void SetFloatingInitializerForVariable (clang::VarDecl *var, const llvm::APFloat &init_value)
 Initializes a variable with a floating point value. More...
 
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, lldb::AccessType access, 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 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)
 

Private Types

typedef llvm::DenseMap< const clang::Decl *, ClangASTMetadataDeclMetadataMap
 
typedef llvm::DenseMap< const clang::Type *, ClangASTMetadataTypeMetadataMap
 

Private Member Functions

clang::PrintingPolicy GetTypePrintingPolicy ()
 Returns the PrintingPolicy used when generating the internal type names. More...
 
std::string GetTypeNameForDecl (const clang::NamedDecl *named_decl)
 Returns the internal type name for the given NamedDecl using the type printing policy. More...
 
const clang::ClassTemplateSpecializationDecl * GetAsTemplateSpecialization (lldb::opaque_compiler_type_t type)
 
 TypeSystemClang (const TypeSystemClang &)
 
const TypeSystemClangoperator= (const TypeSystemClang &)
 
void CreateASTContext ()
 Creates the internal ASTContext. More...
 
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::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::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< 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). More...
 
DeclMetadataMap m_decl_metadata
 Maps Decls to their associated ClangASTMetadata. More...
 
TypeMetadataMap m_type_metadata
 Maps Types to their associated ClangASTMetadata. More...
 
clang::Sema * m_sema = nullptr
 The sema associated that is currently used to build this ASTContext. More...
 

Static Private Attributes

static char ID
 

Additional Inherited Members

- Protected Attributes inherited from lldb_private::TypeSystem
SymbolFilem_sym_file = nullptr
 

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 106 of file TypeSystemClang.h.

Member Typedef Documentation

◆ CompleteObjCInterfaceDeclCallback

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

Definition at line 112 of file TypeSystemClang.h.

◆ CompleteTagDeclCallback

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

Definition at line 111 of file TypeSystemClang.h.

◆ DeclMetadataMap

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

Definition at line 1075 of file TypeSystemClang.h.

◆ TypeMetadataMap

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

Definition at line 1079 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 551 of file TypeSystemClang.cpp.

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

◆ 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 571 of file TypeSystemClang.cpp.

References Finalize().

◆ TypeSystemClang() [3/3]

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

Member Function Documentation

◆ AddConstModifier()

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

Reimplemented from lldb_private::TypeSystem.

Definition at line 4538 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,
int64_t  enum_value,
uint32_t  enum_value_bit_size 
)

◆ AddFieldToRecordType()

clang::FieldDecl * TypeSystemClang::AddFieldToRecordType ( const CompilerType type,
llvm::StringRef  name,
const CompilerType field_type,
lldb::AccessType  access,
uint32_t  bitfield_bit_size 
)
static

◆ AddMethodOverridesForCXXRecordType()

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

◆ AddMethodToCXXRecordType()

clang::CXXMethodDecl * TypeSystemClang::AddMethodToCXXRecordType ( lldb::opaque_compiler_type_t  type,
llvm::StringRef  name,
const char *  mangled_name,
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,
lldb::AccessType  access,
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

◆ AddRestrictModifier()

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

Reimplemented from lldb_private::TypeSystem.

Definition at line 4558 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ AddVariableToRecordType()

clang::VarDecl * TypeSystemClang::AddVariableToRecordType ( const CompilerType type,
llvm::StringRef  name,
const CompilerType var_type,
lldb::AccessType  access 
)
static

◆ AddVolatileModifier()

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

Reimplemented from lldb_private::TypeSystem.

Definition at line 4548 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ AreTypesSame()

bool TypeSystemClang::AreTypesSame ( CompilerType  type1,
CompilerType  type2,
bool  ignore_qualifiers = false 
)
static

◆ BuildIndirectFields()

void TypeSystemClang::BuildIndirectFields ( const CompilerType type)
static

◆ CanPassInRegisters()

bool TypeSystemClang::CanPassInRegisters ( const CompilerType type)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 3654 of file TypeSystemClang.cpp.

References GetAsRecordDecl().

◆ CheckOverloadedOperatorKindParameterCount()

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

Definition at line 1715 of file TypeSystemClang.cpp.

Referenced by AddMethodToCXXRecordType(), and GetDeclarationName().

◆ classof()

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

Definition at line 117 of file TypeSystemClang.h.

References ID, and lldb_private::TypeSystem::isA().

◆ CompleteObjCInterfaceDecl()

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

◆ CompleteTagDecl()

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

◆ CompleteTagDeclarationDefinition()

bool TypeSystemClang::CompleteTagDeclarationDefinition ( const CompilerType type)
static

◆ 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,
size_t  element_count,
bool  is_vector 
)

◆ CreateASTContext()

void TypeSystemClang::CreateASTContext ( )
private

◆ 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 
)

◆ CreateBlockPointerType()

CompilerType TypeSystemClang::CreateBlockPointerType ( const CompilerType function_type)

◆ CreateClassTemplateDecl()

ClassTemplateDecl * TypeSystemClang::CreateClassTemplateDecl ( clang::DeclContext *  decl_ctx,
OptionalClangModuleID  owning_module,
lldb::AccessType  access_type,
const char *  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 1687 of file TypeSystemClang.cpp.

References getASTContext(), and GetType().

Referenced by DWARFASTParserClang::ParseStructureLikeDIE().

◆ CreateDeclContext()

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

◆ CreateEnumerationType()

CompilerType TypeSystemClang::CreateEnumerationType ( const char *  name,
clang::DeclContext *  decl_ctx,
OptionalClangModuleID  owning_module,
const Declaration decl,
const CompilerType integer_qual_type,
bool  is_scoped 
)

◆ CreateFunctionDeclaration()

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

◆ 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,
const CompilerType args,
unsigned  num_args,
bool  is_variadic,
unsigned  type_quals,
clang::CallingConv  cc = clang::CC_C 
)

◆ CreateInstance()

lldb::TypeSystemSP TypeSystemClang::CreateInstance ( lldb::LanguageType  language,
lldb_private::Module module,
Target target 
)
static

◆ CreateMemberPointerType()

CompilerType TypeSystemClang::CreateMemberPointerType ( const CompilerType type,
const CompilerType pointee_type 
)
static

◆ CreateObjCClass()

CompilerType TypeSystemClang::CreateObjCClass ( llvm::StringRef  name,
clang::DeclContext *  decl_ctx,
OptionalClangModuleID  owning_module,
bool  isForwardDecl,
bool  isInternal,
ClangASTMetadata metadata = nullptr 
)

Definition at line 1798 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 
)

◆ CreateRecordType()

CompilerType TypeSystemClang::CreateRecordType ( clang::DeclContext *  decl_ctx,
OptionalClangModuleID  owning_module,
lldb::AccessType  access_type,
llvm::StringRef  name,
int  kind,
lldb::LanguageType  language,
ClangASTMetadata metadata = nullptr,
bool  exports_symbols = false 
)

◆ CreateStructForIdentifier()

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

◆ CreateTemplateTemplateParmDecl()

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

◆ 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 4567 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 1960 of file TypeSystemClang.cpp.

References getASTContext(), and SetOwningModule().

Referenced by DWARFASTParserClang::GetClangDeclForDIE().

◆ CreateUsingDirectiveDeclaration()

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

◆ CreateVariableDeclaration()

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

◆ 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()

ObjCMethodDecl * TypeSystemClang::DeclContextGetAsObjCMethodDecl ( const CompilerDeclContext dc)
static

◆ DeclContextGetMetaData()

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 9548 of file TypeSystemClang.cpp.

◆ DeclContextGetScopeQualifiedName()

ConstString TypeSystemClang::DeclContextGetScopeQualifiedName ( void *  opaque_decl_ctx)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 9559 of file TypeSystemClang.cpp.

References GetTypeNameForDecl().

◆ DeclContextGetTypeSystemClang()

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

◆ DeclContextIsClassMethod()

bool TypeSystemClang::DeclContextIsClassMethod ( void *  opaque_decl_ctx,
lldb::LanguageType language_ptr,
bool *  is_instance_method_ptr,
ConstString language_object_name_ptr 
)
overridevirtual

◆ DeclContextIsContainedInLookup()

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

Implements lldb_private::TypeSystem.

Definition at line 9609 of file TypeSystemClang.cpp.

◆ DeclGetDeclContext()

CompilerDeclContext TypeSystemClang::DeclGetDeclContext ( void *  opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9321 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 9349 of file TypeSystemClang.cpp.

References GetType().

◆ DeclGetFunctionNumArguments()

size_t TypeSystemClang::DeclGetFunctionNumArguments ( void *  opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9338 of file TypeSystemClang.cpp.

◆ DeclGetFunctionReturnType()

CompilerType TypeSystemClang::DeclGetFunctionReturnType ( void *  opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9327 of file TypeSystemClang.cpp.

References GetType().

◆ DeclGetMangledName()

ConstString TypeSystemClang::DeclGetMangledName ( void *  opaque_decl)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 9291 of file TypeSystemClang.cpp.

References getMangleContext().

◆ DeclGetName()

ConstString TypeSystemClang::DeclGetName ( void *  opaque_decl)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 9281 of file TypeSystemClang.cpp.

◆ DeclsAreEquivalent()

bool TypeSystemClang::DeclsAreEquivalent ( clang::Decl *  lhs_decl,
clang::Decl *  rhs_decl 
)
static

◆ 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 8357 of file TypeSystemClang.cpp.

References GetQualType().

◆ Dump()

void TypeSystemClang::Dump ( Stream s)

◆ DumpDeclContextHiearchy()

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

Definition at line 2379 of file TypeSystemClang.cpp.

Referenced by DumpDeclHiearchy().

◆ DumpDeclHiearchy()

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

Definition at line 2393 of file TypeSystemClang.cpp.

References DumpDeclContextHiearchy().

◆ DumpFromSymbolFile()

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

◆ DumpSummary()

void TypeSystemClang::DumpSummary ( lldb::opaque_compiler_type_t  type,
ExecutionContext exe_ctx,
Stream s,
const DataExtractor data,
lldb::offset_t  data_offset,
size_t  data_byte_size 
)
overridevirtual

◆ 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 9033 of file TypeSystemClang.cpp.

References lldb_private::ClangASTMetadata::Dump(), GetMetadata(), and lldb_private::ClangUtil::GetQualType().

Referenced by GetBitSize().

◆ 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 9046 of file TypeSystemClang.cpp.

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

◆ DumpTypeName()

void TypeSystemClang::DumpTypeName ( const CompilerType type)
static

◆ 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

◆ DumpValue()

void TypeSystemClang::DumpValue ( lldb::opaque_compiler_type_t  type,
ExecutionContext exe_ctx,
Stream s,
lldb::Format  format,
const DataExtractor data,
lldb::offset_t  data_offset,
size_t  data_byte_size,
uint32_t  bitfield_bit_size,
uint32_t  bitfield_bit_offset,
bool  show_types,
bool  show_summary,
bool  verbose,
uint32_t  depth 
)
overridevirtual

◆ FieldIsBitfield()

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

Definition at line 1754 of file TypeSystemClang.cpp.

References getASTContext(), and UINT32_MAX.

Referenced by DumpValue(), and 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 5505 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 4200 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 4216 of file TypeSystemClang.cpp.

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

◆ GetAsCXXRecordDecl()

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

◆ GetAsDeclContext()

static 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

Definition at line 7199 of file TypeSystemClang.cpp.

References lldb_private::ClangUtil::GetAsTagDecl().

Referenced by DumpFromSymbolFile().

◆ getASTContext()

ASTContext & TypeSystemClang::getASTContext ( )

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

Definition at line 692 of file TypeSystemClang.cpp.

References m_ast_up.

Referenced by AddEnumerationValueToEnumerationType(), PDBASTParser::AddEnumValue(), AddFieldToRecordType(), lldb_private::NameSearchContext::AddFunDecl(), AddMethodToCXXRecordType(), AddMethodToObjCObjectType(), AddObjCClassProperty(), PDBASTParser::AddRecordMembers(), lldb_private::NameSearchContext::AddVarDecl(), AddVariableToRecordType(), lldb_private::AppleObjCDeclVendor::AppleObjCDeclVendor(), AreTypesSame(), BuildIndirectFields(), lldb_private::AppleObjCTypeEncodingParser::BuildObjCObjectPointerType(), lldb_private::AppleObjCTypeEncodingParser::BuildType(), lldb_private::ASTResultSynthesizer::CommitPersistentDecls(), lldb_private::npdb::PdbAstBuilder::CompleteTagDecl(), CompleteTagDeclarationDefinition(), lldb_private::ClangASTImporter::CopyType(), CreateArrayType(), CreateBaseClassSpecifier(), CreateBlockDeclaration(), CreateClassTemplateDecl(), CreateClassTemplateSpecializationDecl(), CreateClassTemplateSpecializationType(), CreateDeclContext(), CreateEnumerationType(), CreateFunctionDeclaration(), CreateFunctionTemplateDecl(), CreateFunctionType(), PDBASTParser::CreateLLDBTypeFromPDBType(), CreateMemberPointerType(), CreateObjCClass(), CreateParameterDeclaration(), lldb_private::npdb::PdbAstBuilder::CreatePointerType(), CreateRecordType(), lldb_private::npdb::PdbAstBuilder::CreateSimpleType(), CreateTemplateTemplateParmDecl(), CreateTypedef(), CreateUsingDeclaration(), CreateUsingDirectiveDeclaration(), CreateVariableDeclaration(), DeclContextGetTypeSystemClang(), lldb_private::ClangASTImporter::DeportType(), lldb_private::ClangExpressionDeclMap::DeportType(), DumpFromSymbolFile(), DumpTypeDescription(), DumpTypeValue(), DumpValue(), FieldIsBitfield(), lldb_private::AppleObjCDeclVendor::FindDecls(), lldb_private::AppleObjCDeclVendor::FinishDecl(), lldb_private::ScratchTypeSystemClang::ForgetSource(), GetArrayType(), lldb_private::NameSearchContext::GetASTContext(), GetAtomicType(), GetBasicType(), GetBitSize(), GetBuiltinTypeForDWARFEncodingAndBitSize(), GetBuiltinTypeForEncodingAndBitSize(), GetBuiltinTypeForPDBEncodingAndBitSize(), GetChildCompilerTypeAtIndex(), GetCompilerDecl(), GetCompleteDecl(), GetCompleteType(), GetCStringType(), GetDeclarationName(), lldb_private::AppleObjCDeclVendor::GetDeclForISA(), PDBASTParser::GetDeclForSymbol(), GetDirectBaseClassAtIndex(), GetDisplayTypeName(), GetFieldAtIndex(), GetFloatTypeSemantics(), GetFullyUnqualifiedType(), GetIndexOfChildMemberWithName(), GetIntTypeFromBitSize(), GetLValueReferenceType(), getMangleContext(), GetMemberFunctionAtIndex(), GetMinimumLanguage(), GetNumChildren(), GetNumMemberFunctions(), GetOrCreateClangModule(), GetPointerSizedIntType(), GetPointerType(), GetRValueReferenceType(), getTargetInfo(), GetTranslationUnitDecl(), GetType(), GetTypeBitAlign(), GetTypeForIdentifier(), GetTypeInfo(), GetTypePrintingPolicy(), GetUniqueNamespaceDeclaration(), GetVirtualBaseClassAtIndex(), lldb_private::ClangASTSource::InstallASTContext(), IsCompleteType(), IsHomogeneousAggregate(), DWARFASTParserClang::ParseTemplateDIE(), DWARFASTParserClang::ResolveNamespaceDIE(), SetExternalSource(), SetIsPacked(), SetObjCSuperClass(), and lldb_private::AppleObjCExternalASTSource::StartTranslationUnit().

◆ GetASTContext()

TypeSystemClang * TypeSystemClang::GetASTContext ( clang::ASTContext *  ast_ctx)
static

◆ 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 4531 of file TypeSystemClang.cpp.

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

◆ GetBasicType()

CompilerType TypeSystemClang::GetBasicType ( lldb::BasicType  type)

Definition at line 938 of file TypeSystemClang.cpp.

References getASTContext(), and GetOpaqueCompilerType().

Referenced by lldb_private::ClangExpressionDeclMap::AddContextClassType(), lldb_private::ClangExpressionDeclMap::AddOneGenericVariable(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::BlockPointerSyntheticFrontEnd(), PDBASTParser::CreateLLDBTypeFromPDBType(), PlatformPOSIX::DoLoadImage(), lldb_private::AppleObjCRuntime::GetBacktraceThreadFromException(), lldb_private::npdb::PdbAstBuilder::GetBasicType(), GetBasicTypeFromAST(), GetBuiltinTypeByName(), GetBuiltinTypeForPDBEncodingAndBitSize(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::GetClassInfoUtilityFunctionImpl(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::GetClassInfoUtilityFunctionImpl(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), GetLLDBNSPairType(), GetNSPathStore2Type(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), GetPointerByteSize(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetValueOffset(), lldb_private::formatters::LibcxxWStringSummaryProvider(), PlatformPOSIX::MakeLoadImageUtilityFunction(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), ObjCExceptionRecognizedStackFrame::ObjCExceptionRecognizedStackFrame(), DWARFASTParserClang::ParseEnum(), DWARFASTParserClang::ParseSubroutine(), DWARFASTParserClang::ParseTemplateDIE(), DWARFASTParserClang::ParseTypeModifier(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(), lldb_private::AppleObjCTrampolineHandler::SetupDispatchFunction(), lldb_private::AppleGetPendingItemsHandler::SetupGetPendingItemsFunction(), lldb_private::AppleGetQueuesHandler::SetupGetQueuesFunction(), lldb_private::AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction(), and lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::Update().

◆ GetBasicTypeEnumeration() [1/3]

lldb::BasicType TypeSystemClang::GetBasicTypeEnumeration ( ConstString  name)
static

◆ GetBasicTypeEnumeration() [2/3]

lldb::BasicType TypeSystemClang::GetBasicTypeEnumeration ( lldb::opaque_compiler_type_t  type)
overridevirtual

◆ GetBasicTypeEnumeration() [3/3]

static lldb::BasicType lldb_private::TypeSystemClang::GetBasicTypeEnumeration ( lldb::opaque_compiler_type_t  type,
ConstString  name 
)
static

◆ GetBasicTypeFromAST()

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

Implements lldb_private::TypeSystem.

Definition at line 4622 of file TypeSystemClang.cpp.

References GetBasicType().

◆ GetBitSize()

Optional< 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 5428 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::Optional<uint64_t> lldb_private::TypeSystemClang::GetByteSize ( lldb::opaque_compiler_type_t  type,
ExecutionContextScope exe_scope 
)
inline

Definition at line 724 of file TypeSystemClang.h.

References GetBitSize().

Referenced by GetPointerByteSize().

◆ GetCanonicalQualType()

static clang::QualType lldb_private::TypeSystemClang::GetCanonicalQualType ( lldb::opaque_compiler_type_t  type)
inlinestatic

◆ GetCanonicalType()

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

Implements lldb_private::TypeSystem.

Definition at line 4234 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and GetType().

◆ GetChildCompilerTypeAtIndex()

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 459 of file TypeSystemClang.h.

References getASTContext().

Referenced by DeclContextFindDeclByName(), lldb_private::AppleObjCDeclVendor::FindDecls(), SymbolFilePDB::GetDeclForUID(), DWARFASTParserClang::GetDeclForUIDFromDWARF(), GetMemberFunctionAtIndex(), and lldb_private::npdb::PdbAstBuilder::ToCompilerDecl().

◆ GetCompleteDecl() [1/2]

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

Definition at line 2498 of file TypeSystemClang.cpp.

◆ GetCompleteDecl() [2/2]

bool lldb_private::TypeSystemClang::GetCompleteDecl ( clang::Decl *  decl)
inline

◆ GetCompleteType()

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

◆ GetCStringType()

CompilerType TypeSystemClang::GetCStringType ( bool  is_const)

◆ GetCXXClassName()

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

◆ GetDeclarationName()

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

◆ GetDeclContextForType() [1/2]

clang::DeclContext * TypeSystemClang::GetDeclContextForType ( clang::QualType  type)
static

◆ GetDeclContextForType() [2/2]

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

◆ GetDirectBaseClassAtIndex()

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

◆ getDisplayName()

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

◆ GetDisplayTypeName()

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

Implements lldb_private::TypeSystem.

Definition at line 3764 of file TypeSystemClang.cpp.

References getASTContext(), and GetQualType().

◆ GetDWARFParser()

DWARFASTParser * TypeSystemClang::GetDWARFParser ( )
overridevirtual

◆ GetEncoding()

lldb::Encoding TypeSystemClang::GetEncoding ( lldb::opaque_compiler_type_t  type,
uint64_t &  count 
)
overridevirtual

◆ 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 8326 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()

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

◆ GetFloatTypeSemantics()

const llvm::fltSemantics & TypeSystemClang::GetFloatTypeSemantics ( size_t  byte_size)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4628 of file TypeSystemClang.cpp.

References getASTContext().

◆ GetFormat()

lldb::Format TypeSystemClang::GetFormat ( lldb::opaque_compiler_type_t  type)
overridevirtual

◆ 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 3102 of file TypeSystemClang.cpp.

References GetQualType().

◆ GetFunctionArgumentCount()

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

Implements lldb_private::TypeSystem.

Definition at line 4268 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 4279 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 4294 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ GetIndexOfChildMemberWithName()

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

◆ GetIndexOfChildWithName()

uint32_t TypeSystemClang::GetIndexOfChildWithName ( lldb::opaque_compiler_type_t  type,
const char *  name,
bool  omit_empty_base_classes 
)
overridevirtual

◆ GetIntegralTemplateArgument()

Optional< CompilerType::IntegralTemplateArgument > TypeSystemClang::GetIntegralTemplateArgument ( lldb::opaque_compiler_type_t  type,
size_t  idx 
)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 7161 of file TypeSystemClang.cpp.

References GetAsTemplateSpecialization(), and GetType().

◆ GetIntTypeFromBitSize()

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

Definition at line 2330 of file TypeSystemClang.cpp.

References getASTContext(), and GetType().

Referenced by GetPointerSizedIntType().

◆ GetLangOpts()

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

Definition at line 1032 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 4516 of file TypeSystemClang.cpp.

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

◆ getMangleContext()

clang::MangleContext * TypeSystemClang::getMangleContext ( )

Definition at line 771 of file TypeSystemClang.cpp.

References getASTContext(), and m_mangle_ctx_up.

Referenced by DeclGetMangledName().

◆ GetMemberFunctionAtIndex()

TypeMemberFunctionImpl TypeSystemClang::GetMemberFunctionAtIndex ( lldb::opaque_compiler_type_t  type,
size_t  idx 
)
overridevirtual

◆ GetMetadata() [1/2]

ClangASTMetadata * TypeSystemClang::GetMetadata ( const clang::Decl *  object)

◆ GetMetadata() [2/2]

ClangASTMetadata * TypeSystemClang::GetMetadata ( const clang::Type *  object)

Definition at line 2565 of file TypeSystemClang.cpp.

References m_type_metadata.

◆ GetMinimumLanguage()

lldb::LanguageType TypeSystemClang::GetMinimumLanguage ( lldb::opaque_compiler_type_t  type)
overridevirtual

◆ GetNonReferenceType()

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

Implements lldb_private::TypeSystem.

Definition at line 4483 of file TypeSystemClang.cpp.

References GetQualType(), and GetType().

◆ GetNumBaseClasses()

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

◆ GetNumberOfFunctionArguments()

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

Implements lldb_private::TypeSystem.

Definition at line 3089 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ GetNumChildren()

uint32_t TypeSystemClang::GetNumChildren ( lldb::opaque_compiler_type_t  type,
bool  omit_empty_base_classes,
const ExecutionContext exe_ctx 
)
overridevirtual

◆ 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 5966 of file TypeSystemClang.cpp.

References RemoveWrappingTypes(), and UInt.

Referenced by GetNumChildren().

◆ GetNumTemplateArguments()

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

Reimplemented from lldb_private::TypeSystem.

Definition at line 7052 of file TypeSystemClang.cpp.

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

◆ GetNumVirtualBaseClasses()

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

◆ GetOpaqueCompilerType()

lldb::opaque_compiler_type_t TypeSystemClang::GetOpaqueCompilerType ( clang::ASTContext *  ast,
lldb::BasicType  basic_type 
)
static

◆ GetOrCreateClangModule()

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

◆ GetOrCreateStructForIdentifier()

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

Definition at line 2284 of file TypeSystemClang.cpp.

References CreateStructForIdentifier().

Referenced by GetNSPathStore2Type().

◆ GetPDBParser()

PDBASTParser * TypeSystemClang::GetPDBParser ( )
overridevirtual

◆ GetPluginName()

ConstString TypeSystemClang::GetPluginName ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 577 of file TypeSystemClang.cpp.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

ConstString TypeSystemClang::GetPluginNameStatic ( )
static

Definition at line 573 of file TypeSystemClang.cpp.

Referenced by GetPluginName(), and Initialize().

◆ GetPointeeType()

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

◆ GetPointerByteSize()

uint32_t TypeSystemClang::GetPointerByteSize ( )
overridevirtual

◆ GetPointerSizedIntType()

CompilerType TypeSystemClang::GetPointerSizedIntType ( bool  is_signed)

Definition at line 2374 of file TypeSystemClang.cpp.

References getASTContext(), and GetIntTypeFromBitSize().

Referenced by NSIndexPathSyntheticFrontEnd::Update().

◆ GetPointerType()

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

Implements lldb_private::TypeSystem.

Definition at line 4499 of file TypeSystemClang.cpp.

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

Referenced by GetPointerByteSize().

◆ GetQualType()

static clang::QualType lldb_private::TypeSystemClang::GetQualType ( lldb::opaque_compiler_type_t  type)
inlinestatic

◆ GetRValueReferenceType()

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

Reimplemented from lldb_private::TypeSystem.

Definition at line 4524 of file TypeSystemClang.cpp.

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

◆ getSema()

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

Definition at line 171 of file TypeSystemClang.h.

References m_sema.

Referenced by lldb_private::ClangASTSource::getSema().

◆ GetSourceMgr()

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

Definition at line 1035 of file TypeSystemClang.h.

References m_source_manager_up.

◆ GetSupportedLanguagesForExpressions()

LanguageSet TypeSystemClang::GetSupportedLanguagesForExpressions ( )
static

◆ GetSupportedLanguagesForTypes()

LanguageSet TypeSystemClang::GetSupportedLanguagesForTypes ( )
static

◆ getTargetInfo()

TargetInfo * TypeSystemClang::getTargetInfo ( )

◆ getTargetOptions()

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

Definition at line 777 of file TypeSystemClang.cpp.

References m_target_options_rp, and m_target_triple.

Referenced by getTargetInfo().

◆ GetTargetTriple()

const char * TypeSystemClang::GetTargetTriple ( )

Definition at line 677 of file TypeSystemClang.cpp.

References m_target_triple.

Referenced by CreateASTContext().

◆ GetTemplateArgumentKind()

lldb::TemplateArgumentKind TypeSystemClang::GetTemplateArgumentKind ( lldb::opaque_compiler_type_t  type,
size_t  idx 
)
overridevirtual

◆ GetTranslationUnitDecl()

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

◆ GetType()

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

Creates a CompilerType form 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 233 of file TypeSystemClang.h.

References getASTContext().

Referenced by AddConstModifier(), AddObjCClassProperty(), AddRestrictModifier(), AddVolatileModifier(), lldb_private::AppleObjCTypeEncodingParser::BuildAggregate(), DWARFASTParserClang::CompleteRecordType(), CreateArrayType(), CreateBlockPointerType(), CreateClassTemplateSpecializationType(), CreateEnumerationType(), lldb_private::npdb::PdbAstBuilder::CreateFunctionParameters(), CreateFunctionType(), CreateMemberPointerType(), CreateObjCClass(), CreateRecordType(), IRForTarget::CreateResultVariable(), CreateTypedef(), DeclGetFunctionArgumentType(), DeclGetFunctionReturnType(), DumpTypeValue(), DumpValue(), ForEachEnumerator(), GetArrayElementType(), GetArrayType(), GetAtomicType(), GetBitSize(), GetBuiltinTypeForDWARFEncodingAndBitSize(), GetBuiltinTypeForEncodingAndBitSize(), GetCanonicalType(), GetChildCompilerTypeAtIndex(), GetCStringType(), GetDirectBaseClassAtIndex(), GetEncoding(), GetEnumerationIntegerType(), GetFieldAtIndex(), GetFullyUnqualifiedType(), GetFunctionArgumentTypeAtIndex(), GetFunctionReturnType(), GetIndexOfChildMemberWithName(), GetIndexOfChildWithName(), GetIntegralTemplateArgument(), GetIntTypeFromBitSize(), GetLValueReferenceType(), GetMemberFunctionAtIndex(), GetMinimumLanguage(), GetNonReferenceType(), GetNumChildren(), GetPointeeType(), GetPointerType(), GetRValueReferenceType(), GetTypedefedType(), GetTypeInfo(), GetTypeTemplateArgument(), GetVirtualBaseClassAtIndex(), lldb_private::ClangASTSource::GuardedCopyType(), IsPossibleDynamicType(), IsVectorType(), IRForTarget::MaybeHandleVariable(), lldb_private::AppleObjCTypeEncodingParser::RealizeType(), and IRForTarget::RewritePersistentAlloc().

◆ GetTypeBitAlign()

llvm::Optional< size_t > TypeSystemClang::GetTypeBitAlign ( lldb::opaque_compiler_type_t  type,
ExecutionContextScope exe_scope 
)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 4707 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 4063 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 4610 of file TypeSystemClang.cpp.

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

◆ GetTypeForDecl() [1/4]

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

◆ GetTypeForDecl() [2/4]

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

◆ GetTypeForDecl() [3/4]

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

◆ GetTypeForDecl() [4/4]

CompilerType TypeSystemClang::GetTypeForDecl ( void *  opaque_decl)
overridevirtual

Implements lldb_private::TypeSystem.

Definition at line 1198 of file TypeSystemClang.cpp.

References GetTypeForDecl().

◆ GetTypeForFormatters()

CompilerType TypeSystemClang::GetTypeForFormatters ( void *  type)
overridevirtual

Reimplemented from lldb_private::TypeSystem.

Definition at line 7177 of file TypeSystemClang.cpp.

References lldb_private::ClangUtil::RemoveFastQualifiers().

◆ GetTypeForIdentifier()

template<typename RecordDeclType >
CompilerType lldb_private::TypeSystemClang::GetTypeForIdentifier ( ConstString  type_name,
clang::DeclContext *  decl_context = nullptr 
)
inline

◆ GetTypeInfo()

uint32_t TypeSystemClang::GetTypeInfo ( lldb::opaque_compiler_type_t  type,
CompilerType pointee_or_element_compiler_type 
)
overridevirtual

◆ GetTypeName()

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

◆ GetTypeNameForDecl()

std::string TypeSystemClang::GetTypeNameForDecl ( const clang::NamedDecl *  named_decl)
private

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

Definition at line 2119 of file TypeSystemClang.cpp.

References GetTypePrintingPolicy(), and string().

Referenced by DeclContextGetScopeQualifiedName(), 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 2097 of file TypeSystemClang.cpp.

References getASTContext().

Referenced by GetTypeName(), and GetTypeNameForDecl().

◆ GetTypeQualifiers()

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

Implements lldb_private::TypeSystem.

Definition at line 4191 of file TypeSystemClang.cpp.

References GetQualType().

◆ GetTypeTemplateArgument()

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

Reimplemented from lldb_private::TypeSystem.

Definition at line 7145 of file TypeSystemClang.cpp.

References GetAsTemplateSpecialization(), and GetType().

◆ GetUniqueNamespaceDeclaration()

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

◆ GetVirtualBaseClassAtIndex()

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

◆ Initialize()

void TypeSystemClang::Initialize ( )
static

◆ isA()

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

Implements lldb_private::TypeSystem.

Reimplemented in lldb_private::ScratchTypeSystemClang.

Definition at line 116 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 2777 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 2798 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 3690 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsBlockPointerType()

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

◆ IsCharType()

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

Implements lldb_private::TypeSystem.

Definition at line 2942 of file TypeSystemClang.cpp.

References GetQualType().

◆ IsClassType()

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

Definition at line 3463 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsCompleteType()

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

Implements lldb_private::TypeSystem.

Definition at line 2946 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 2952 of file TypeSystemClang.cpp.

References GetQualType().

◆ IsCStringType()

bool TypeSystemClang::IsCStringType ( lldb::opaque_compiler_type_t  type,
uint32_t length 
)
overridevirtual

◆ IsCXXClassType()

bool TypeSystemClang::IsCXXClassType ( const CompilerType type)
static

◆ IsDefined()

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

Implements lldb_private::TypeSystem.

Definition at line 3418 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 3197 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and IsIntegerType().

◆ IsEnumType()

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

Definition at line 3471 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 3380 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsFunctionPointerType()

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

Implements lldb_private::TypeSystem.

Definition at line 3116 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and RemoveWrappingTypes().

◆ IsFunctionType()

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

Implements lldb_private::TypeSystem.

Definition at line 2981 of file TypeSystemClang.cpp.

References GetCanonicalQualType(), and RemoveWrappingTypes().

◆ 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 3178 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

Referenced by IsEnumerationType().

◆ IsObjCClassType()

bool TypeSystemClang::IsObjCClassType ( const CompilerType type)
static

◆ IsObjCClassTypeAndHasIVars()

bool TypeSystemClang::IsObjCClassTypeAndHasIVars ( const CompilerType type,
bool  check_superclass 
)
static

Definition at line 7966 of file TypeSystemClang.cpp.

References GetAsObjCInterfaceDecl(), and ObjCDeclHasIVars().

◆ IsObjCObjectOrInterfaceType()

bool TypeSystemClang::IsObjCObjectOrInterfaceType ( const CompilerType type)
static

◆ IsObjCObjectPointerType()

bool TypeSystemClang::IsObjCObjectPointerType ( const CompilerType type,
CompilerType target_type = nullptr 
)
static

◆ IsOperator()

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

Definition at line 359 of file TypeSystemClang.cpp.

Referenced by AddMethodToCXXRecordType(), and GetDeclarationName().

◆ 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 3479 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

◆ IsScalarType()

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

Implements lldb_private::TypeSystem.

Definition at line 3634 of file TypeSystemClang.cpp.

References GetTypeInfo().

◆ IsScopedEnumerationType()

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

Implements lldb_private::TypeSystem.

Definition at line 3213 of file TypeSystemClang.cpp.

References GetCanonicalQualType().

◆ IsTypedefType()

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

Implements lldb_private::TypeSystem.

Definition at line 3641 of file TypeSystemClang.cpp.

References GetQualType(), and RemoveWrappingTypes().

◆ IsVectorType()

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

Implements lldb_private::TypeSystem.

Definition at line 2889 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 3648 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 
)

◆ operator=()

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

◆ 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)
static

◆ SetExternalSource()

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

◆ 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 7494 of file TypeSystemClang.cpp.

◆ SetFunctionParameters()

void TypeSystemClang::SetFunctionParameters ( clang::FunctionDecl *  function_decl,
llvm::ArrayRef< clang::ParmVarDecl * >  params 
)

◆ SetHasExternalStorage()

bool TypeSystemClang::SetHasExternalStorage ( lldb::opaque_compiler_type_t  type,
bool  has_extern 
)
static

◆ 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 7476 of file TypeSystemClang.cpp.

◆ 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 2553 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()

void TypeSystemClang::SetOwningModule ( clang::Decl *  decl,
OptionalClangModuleID  owning_module 
)
static

◆ setSema()

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

Definition at line 671 of file TypeSystemClang.cpp.

References m_ast_up, and m_sema.

◆ SetTargetTriple()

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

Definition at line 681 of file TypeSystemClang.cpp.

References m_target_triple.

Referenced by TypeSystemClang().

◆ StartTagDeclarationDefinition()

bool TypeSystemClang::StartTagDeclarationDefinition ( const CompilerType type)
static

◆ SupportsLanguage()

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

Implements lldb_private::TypeSystem.

Definition at line 3662 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 
)

◆ UnifyAccessSpecifiers()

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

Definition at line 1741 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 2772 of file TypeSystemClang.cpp.

References GetQualType().

Member Data Documentation

◆ ID

char TypeSystemClang::ID
staticprivate

Definition at line 108 of file TypeSystemClang.h.

Referenced by classof(), and isA().

◆ m_ast_owned

bool lldb_private::TypeSystemClang::m_ast_owned = false
private

Definition at line 1069 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 1062 of file TypeSystemClang.h.

Referenced by CreateASTContext(), and Finalize().

◆ m_decl_metadata

DeclMetadataMap lldb_private::TypeSystemClang::m_decl_metadata
private

Maps Decls to their associated ClangASTMetadata.

Definition at line 1077 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 1057 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 1056 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 1073 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 1065 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 1054 of file TypeSystemClang.h.

Referenced by CreateASTContext().

◆ m_header_search_up

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

Definition at line 1063 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 1060 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 1067 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 1064 of file TypeSystemClang.h.

Referenced by GetOrCreateClangModule().

◆ m_pdb_ast_parser_up

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

Definition at line 1066 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 1068 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 1061 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 1086 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 1059 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 1058 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 1081 of file TypeSystemClang.h.

Referenced by GetMetadata(), and SetMetadata().


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