|
LLDB mainline
|
#include <Type.h>
Classes | |
| struct | ParsedName |
Public Types | |
| enum | EncodingDataType { eEncodingInvalid , eEncodingIsUID , eEncodingIsConstUID , eEncodingIsRestrictUID , eEncodingIsVolatileUID , eEncodingIsTypedefUID , eEncodingIsPointerUID , eEncodingIsLValueReferenceUID , eEncodingIsRValueReferenceUID , eEncodingIsAtomicUID , eEncodingIsSyntheticUID , eEncodingIsLLVMPtrAuthUID } |
| enum class | ResolveState : unsigned char { Unresolved = 0 , Forward = 1 , Layout = 2 , Full = 3 } |
| typedef uint32_t | Payload |
Static Public Member Functions | |
| static int | Compare (const Type &a, const Type &b) |
| static std::optional< ParsedName > | GetTypeScopeAndBasename (llvm::StringRef name) |
Protected Member Functions | |
| Type * | GetEncodingType () |
| bool | ResolveCompilerType (ResolveState compiler_type_resolve_state) |
Protected Attributes | |
| ConstString | m_name |
| SymbolFile * | m_symbol_file = nullptr |
| SymbolContextScope * | m_context = nullptr |
| The symbol context in which this type is defined. | |
| Type * | m_encoding_type = nullptr |
| lldb::user_id_t | m_encoding_uid = LLDB_INVALID_UID |
| EncodingDataType | m_encoding_uid_type = eEncodingInvalid |
| uint64_t | m_byte_size: 63 |
| uint64_t | m_byte_size_has_value: 1 |
| Declaration | m_decl |
| CompilerType | m_compiler_type |
| ResolveState | m_compiler_type_resolve_state = ResolveState::Unresolved |
| bool | m_resolving_compiler_type = false |
| Payload | m_payload |
| Language-specific flags. | |
| Protected Attributes inherited from lldb_private::UserID | |
| lldb::user_id_t | m_uid |
| The user ID that uniquely identifies an object. | |
Private Member Functions | |
| Type (lldb::user_id_t uid, SymbolFile *symbol_file, ConstString name, std::optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, ResolveState compiler_type_resolve_state, uint32_t opaque_payload=0) | |
| Type () | |
| Type (Type &t)=default | |
| Type (Type &&t)=default | |
| Type & | operator= (const Type &t)=default |
| Type & | operator= (Type &&t)=default |
Friends | |
| class | lldb_private::SymbolFileCommon |
| Only allow Symbol File to create types, as they should own them by keeping them in their TypeList. | |
| typedef uint32_t lldb_private::Type::Payload |
|
strong |
|
private |
Definition at line 278 of file Type.cpp.
References m_byte_size, m_byte_size_has_value, m_compiler_type, m_compiler_type_resolve_state, m_context, m_decl, m_encoding_uid, m_encoding_uid_type, m_name, m_payload, m_symbol_file, Type(), Unresolved, and lldb_private::UserID::UserID().
Referenced by Compare(), GetByteSize(), GetEncodingMask(), GetEncodingType(), GetTypedefType(), operator=(), operator=(), ResolveCompilerType(), SetEncodingType(), Type(), Type(), Type(), and Type().
|
private |
Definition at line 299 of file Type.cpp.
References m_byte_size, m_byte_size_has_value, m_name, m_payload, Type(), and lldb_private::UserID::UserID().
| void Type::Dump | ( | Stream * | s, |
| bool | show_context, | ||
| lldb::DescriptionLevel | level = lldb::eDescriptionLevelFull ) |
Definition at line 374 of file Type.cpp.
References lldb_private::CompilerType::DumpTypeDescription(), eEncodingInvalid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsSyntheticUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, lldb_private::Stream::EOL(), lldb_private::Stream::Format(), GetForwardCompilerType(), lldb_private::Stream::Indent(), LLDB_INVALID_UID, m_byte_size, m_byte_size_has_value, m_compiler_type, m_context, m_decl, m_encoding_uid, m_encoding_uid_type, m_name, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::UserID::UserID().
| void Type::DumpTypeName | ( | Stream * | s | ) |
Definition at line 452 of file Type.cpp.
References lldb_private::ConstString::Dump(), and GetName().
Referenced by lldb_private::Variable::Dump().
| ConstString Type::GetBaseName | ( | ) |
Definition at line 448 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::GetTypeName().
| llvm::Expected< uint64_t > Type::GetByteSize | ( | ExecutionContextScope * | exe_scope | ) |
Definition at line 460 of file Type.cpp.
References eEncodingInvalid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsSyntheticUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, lldb_private::CompilerType::GetByteSize(), GetByteSize(), GetEncodingType(), GetLayoutCompilerType(), m_byte_size, m_byte_size_has_value, m_encoding_uid_type, m_symbol_file, and Type().
Referenced by DWARFASTParserClang::CompleteEnumType(), lldb_private::SymbolFileCTF::CompleteType(), lldb_private::SymbolFileCTF::CreateArray(), GetByteSize(), GetDescription(), DWARFASTParserClang::ParseArrayType(), DWARFASTParserClang::ParseSingleMember(), and ReadFromMemory().
| const Declaration & Type::GetDeclaration | ( | ) | const |
Definition at line 585 of file Type.cpp.
References m_decl.
Referenced by lldb_private::Block::AddRange().
| void Type::GetDescription | ( | Stream * | s, |
| lldb::DescriptionLevel | level, | ||
| bool | show_name, | ||
| ExecutionContextScope * | exe_scope ) |
Definition at line 306 of file Type.cpp.
References lldb_private::CompilerType::DumpTypeDescription(), lldb::eDescriptionLevelVerbose, eEncodingInvalid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsSyntheticUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, GetByteSize(), GetForwardCompilerType(), GetName(), GetQualifiedName(), LLDB_INVALID_UID, m_byte_size, m_compiler_type, m_decl, m_encoding_uid, m_encoding_uid_type, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::UserID::UserID().
Referenced by lldb_private::SymbolContext::GetDescription().
| lldb::Encoding Type::GetEncoding | ( | ) |
Definition at line 535 of file Type.cpp.
References lldb_private::CompilerType::GetEncoding(), and GetForwardCompilerType().
| uint32_t Type::GetEncodingMask | ( | ) |
Definition at line 772 of file Type.cpp.
References GetEncodingMask(), GetEncodingType(), m_encoding_uid_type, and Type().
Referenced by GetCXXMethodCVQuals(), and GetEncodingMask().
|
protected |
Definition at line 454 of file Type.cpp.
References LLDB_INVALID_UID, m_encoding_type, m_encoding_uid, m_symbol_file, and Type().
Referenced by GetByteSize(), GetEncodingMask(), and ResolveCompilerType().
| ModuleSP Type::GetExeModule | ( | ) |
GetModule may return module for compile unit's object file.
GetExeModule returns module for executable object file that contains compile unit where type was actually defined. GetModule and GetExeModule may return the same value.
Definition at line 866 of file Type.cpp.
References lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFile::GetObjectFile(), and m_compiler_type.
| lldb::Format Type::GetFormat | ( | ) |
Definition at line 533 of file Type.cpp.
References lldb_private::CompilerType::GetFormat(), and GetForwardCompilerType().
| CompilerType Type::GetForwardCompilerType | ( | ) |
Definition at line 791 of file Type.cpp.
References Forward, m_compiler_type, and ResolveCompilerType().
Referenced by PDBASTParser::CreateLLDBTypeFromPDBType(), DWARFASTParserClang::CreateStaticMemberVariable(), Dump(), GetBaseName(), DWARFASTParserClang::GetClangDeclForDIE(), lldb_private::Value::GetCompilerType(), lldb_private::ValueObjectVariable::GetCompilerTypeImpl(), PDBASTParser::GetDeclForSymbol(), GetDescription(), lldb_private::ValueObjectVariable::GetDisplayTypeName(), GetEncoding(), GetFormat(), GetInstanceType(), GetName(), GetNumChildren(), GetQualifiedName(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), InferArtificialCoroType(), IsAggregateType(), IsTemplateType(), lldb_private::StackFrame::LegacyGetValueForVariableExpressionPath(), lldb_private::ClangExpressionDeclMap::LookUpLldbClass(), DWARFASTParserClang::ParseArrayType(), DWARFASTParserClang::ParseChildParameters(), DWARFASTParserClang::ParseCXXMethod(), DWARFASTParserClang::ParsePointerToMemberType(), DWARFASTParserClang::ParseSubroutine(), DWARFASTParserClang::ParseTemplateDIE(), PrivateAutoComplete(), ResolveCompilerType(), and lldb_private::ClangUserExpression::ScanContext().
| CompilerType Type::GetFullCompilerType | ( | ) |
Definition at line 781 of file Type.cpp.
References Full, m_compiler_type, and ResolveCompilerType().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), PDBASTParser::AddRecordBases(), PDBASTParser::AddRecordMethod(), lldb_private::SymbolFileCTF::CompleteType(), DWARFASTParserClang::CopyUniqueClassMethodTypes(), lldb_private::SymbolFileCTF::CreateArray(), lldb_private::SymbolFileCTF::CreateFunction(), PDBASTParser::CreateLLDBTypeFromPDBType(), lldb_private::SymbolFileCTF::CreateModifier(), lldb_private::SymbolFileCTF::CreateTypedef(), lldb_private::Function::GetCompilerType(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), lldb_private::ClangExpressionDeclMap::LookUpLldbObjCClass(), DWARFASTParserClang::ParseEnum(), lldb_private::SymbolFileCTF::ParseFunctions(), DWARFASTParserClang::ParseInheritance(), and lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts().
| CompilerType Type::GetLayoutCompilerType | ( | ) |
Definition at line 786 of file Type.cpp.
References Layout, m_compiler_type, and ResolveCompilerType().
Referenced by PDBASTParser::AddRecordMembers(), GetByteSize(), DWARFASTParserClang::ParseObjCProperty(), and DWARFASTParserClang::ParseSingleMember().
| ModuleSP Type::GetModule | ( | ) |
| ConstString Type::GetName | ( | ) |
Definition at line 442 of file Type.cpp.
References GetForwardCompilerType(), lldb_private::CompilerType::GetTypeName(), and m_name.
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::plugin::dwarf::SymbolFileDWARF::CompleteType(), lldb_private::Address::Dump(), DumpTypeName(), lldb::SBFunction::GetDescription(), GetDescription(), and lldb_private::ValueObjectVariable::GetTypeName().
|
inline |
| llvm::Expected< uint32_t > Type::GetNumChildren | ( | bool | omit_empty_base_classes | ) |
Definition at line 511 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::GetNumChildren().
|
inline |
| ConstString Type::GetQualifiedName | ( | ) |
Definition at line 796 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::GetTypeName().
Referenced by GetDescription(), and lldb_private::ValueObjectVariable::GetQualifiedTypeName().
|
inline |
|
inline |
|
inline |
Definition at line 476 of file Type.h.
References m_symbol_file.
Referenced by lldb_private::Variable::GetDecl(), lldb_private::Variable::GetDeclContext(), and ResolveCompilerType().
|
inline |
Definition at line 477 of file Type.h.
References m_symbol_file.
| lldb::TypeSP Type::GetTypedefType | ( | ) |
Definition at line 523 of file Type.cpp.
References IsTypedef(), m_encoding_uid, m_symbol_file, and Type().
|
static |
Definition at line 801 of file Type.cpp.
References lldb_private::Type::ParsedName::basename, lldb_private::Type::ParsedName::scope, and lldb_private::Type::ParsedName::type_class.
Referenced by lldb_private::npdb::SymbolFileNativePDB::GetContextForType(), and lldb_private::TypeQuery::TypeQuery().
| bool Type::IsAggregateType | ( | ) |
Definition at line 515 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::IsAggregateType().
| bool Type::IsTemplateType | ( | ) |
Definition at line 519 of file Type.cpp.
References GetForwardCompilerType(), and lldb_private::CompilerType::IsTemplateType().
|
inline |
Definition at line 494 of file Type.h.
References eEncodingIsTypedefUID, and m_encoding_uid_type.
Referenced by GetTypedefType().
|
inline |
Definition at line 492 of file Type.h.
References eEncodingInvalid, and m_encoding_uid_type.
| bool Type::ReadFromMemory | ( | ExecutionContext * | exe_ctx, |
| lldb::addr_t | address, | ||
| AddressType | address_type, | ||
| DataExtractor & | data ) |
Definition at line 540 of file Type.cpp.
References lldb_private::eAddressTypeFile, lldb_private::eAddressTypeHost, error(), lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::DataExtractor::GetByteSize(), GetByteSize(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::DataExtractor::PeekData(), lldb_private::Process::ReadMemory(), and lldb_private::DataExtractor::SetData().
|
protected |
Definition at line 587 of file Type.cpp.
References lldb_private::CompilerType::AddConstModifier(), lldb_private::CompilerType::AddPtrAuthModifier(), lldb_private::CompilerType::AddRestrictModifier(), lldb_private::CompilerType::AddVolatileModifier(), lldb_private::CompilerType::CreateTypedef(), lldb::eBasicTypeVoid, eEncodingIsAtomicUID, eEncodingIsConstUID, eEncodingIsLLVMPtrAuthUID, eEncodingIsLValueReferenceUID, eEncodingIsPointerUID, eEncodingIsRestrictUID, eEncodingIsRValueReferenceUID, eEncodingIsTypedefUID, eEncodingIsUID, eEncodingIsVolatileUID, lldb::eLanguageTypeC, Forward, Full, lldb_private::CompilerType::GetAtomicType(), lldb_private::CompilerType::GetBasicTypeFromAST(), GetEncodingType(), GetForwardCompilerType(), lldb_private::UserID::GetID(), lldb_private::GetLog(), lldb_private::CompilerType::GetLValueReferenceType(), lldb_private::CompilerType::GetPointerType(), lldb_private::CompilerType::GetRValueReferenceType(), GetSymbolFile(), lldb_private::CompilerType::IsValid(), Layout, LLDB_INVALID_UID, LLDB_LOG, LLDB_LOG_ERROR, m_compiler_type, m_compiler_type_resolve_state, m_encoding_uid, m_encoding_uid_type, m_name, m_payload, m_resolving_compiler_type, m_symbol_file, ResolveCompilerType(), lldb_private::Symbols, and Type().
Referenced by GetForwardCompilerType(), GetFullCompilerType(), GetLayoutCompilerType(), and ResolveCompilerType().
|
inline |
Definition at line 566 of file Type.h.
References m_encoding_type, and Type().
|
inline |
|
inline |
| bool Type::WriteToMemory | ( | ExecutionContext * | exe_ctx, |
| lldb::addr_t | address, | ||
| AddressType | address_type, | ||
| DataExtractor & | data ) |
|
friend |
|
protected |
Definition at line 584 of file Type.h.
Referenced by Dump(), GetByteSize(), GetDescription(), Type(), and Type().
|
protected |
|
protected |
Definition at line 587 of file Type.h.
Referenced by Dump(), GetDescription(), GetExeModule(), GetForwardCompilerType(), GetFullCompilerType(), GetLayoutCompilerType(), ResolveCompilerType(), and Type().
|
protected |
Definition at line 588 of file Type.h.
Referenced by ResolveCompilerType(), and Type().
|
protected |
The symbol context in which this type is defined.
Definition at line 580 of file Type.h.
Referenced by Dump(), GetSymbolContextScope(), GetSymbolContextScope(), SetSymbolContextScope(), and Type().
|
protected |
Definition at line 586 of file Type.h.
Referenced by Dump(), GetDeclaration(), GetDescription(), and Type().
|
protected |
Definition at line 581 of file Type.h.
Referenced by GetEncodingType(), and SetEncodingType().
|
protected |
Definition at line 582 of file Type.h.
Referenced by Dump(), GetDescription(), GetEncodingType(), GetTypedefType(), ResolveCompilerType(), and Type().
|
protected |
Definition at line 583 of file Type.h.
Referenced by Dump(), GetByteSize(), GetDescription(), GetEncodingMask(), IsTypedef(), IsValidType(), ResolveCompilerType(), and Type().
|
protected |
|
protected |
Language-specific flags.
Definition at line 591 of file Type.h.
Referenced by GetPayload(), ResolveCompilerType(), SetPayload(), Type(), and Type().
|
protected |
Definition at line 589 of file Type.h.
Referenced by ResolveCompilerType().
|
protected |
Definition at line 578 of file Type.h.
Referenced by GetByteSize(), GetEncodingType(), GetModule(), GetSymbolFile(), GetSymbolFile(), GetTypedefType(), ResolveCompilerType(), and Type().