LLDB mainline
|
Sometimes you can find the name of the type corresponding to an object, but we don't have debug information for it. More...
#include <Type.h>
Public Member Functions | |
TypeAndOrName ()=default | |
TypeAndOrName (lldb::TypeSP &type_sp) | |
TypeAndOrName (const CompilerType &compiler_type) | |
TypeAndOrName (const char *type_str) | |
TypeAndOrName (ConstString &type_const_string) | |
bool | operator== (const TypeAndOrName &other) const |
bool | operator!= (const TypeAndOrName &other) const |
ConstString | GetName () const |
CompilerType | GetCompilerType () const |
void | SetName (ConstString type_name) |
void | SetName (const char *type_name_cstr) |
void | SetName (llvm::StringRef name) |
void | SetTypeSP (lldb::TypeSP type_sp) |
void | SetCompilerType (CompilerType compiler_type) |
bool | IsEmpty () const |
bool | HasName () const |
bool | HasCompilerType () const |
bool | HasType () const |
void | Clear () |
operator bool () | |
Private Attributes | |
CompilerType | m_compiler_type |
ConstString | m_type_name |
Sometimes you can find the name of the type corresponding to an object, but we don't have debug information for it.
If that is the case, you can return one of these objects, and then if it has a full type, you can use that, but if not at least you can print the name for informational purposes.
|
default |
TypeAndOrName::TypeAndOrName | ( | lldb::TypeSP & | type_sp | ) |
Definition at line 839 of file Type.cpp.
References m_compiler_type, and m_type_name.
lldb_private::TypeAndOrName::TypeAndOrName | ( | const CompilerType & | compiler_type | ) |
TypeAndOrName::TypeAndOrName | ( | ConstString & | type_const_string | ) |
void TypeAndOrName::Clear | ( | ) |
Definition at line 902 of file Type.cpp.
References lldb_private::CompilerType::Clear(), lldb_private::ConstString::Clear(), m_compiler_type, and m_type_name.
Referenced by lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntimeV1::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), SetTypeSP(), and lldb_private::ValueObjectDynamicValue::UpdateValue().
|
inline |
Definition at line 726 of file Type.h.
References m_compiler_type.
Referenced by lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::GNUstepObjCRuntime::FixUpDynamicType(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), and lldb_private::ValueObjectDynamicValue::UpdateValue().
ConstString TypeAndOrName::GetName | ( | ) | const |
Definition at line 864 of file Type.cpp.
References lldb_private::CompilerType::GetTypeName(), m_compiler_type, and m_type_name.
Referenced by lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::GNUstepObjCRuntime::FixUpDynamicType(), lldb_private::ValueObjectDynamicValue::GetDisplayTypeName(), lldb_private::ValueObjectDynamicValue::GetQualifiedTypeName(), and lldb_private::ValueObjectDynamicValue::GetTypeName().
bool TypeAndOrName::HasCompilerType | ( | ) | const |
Definition at line 909 of file Type.cpp.
References lldb_private::CompilerType::IsValid(), and m_compiler_type.
Referenced by HasType().
bool TypeAndOrName::HasName | ( | ) | const |
Definition at line 907 of file Type.cpp.
References m_type_name.
Referenced by lldb_private::ValueObjectDynamicValue::GetDisplayTypeName(), lldb_private::ValueObjectDynamicValue::GetQualifiedTypeName(), and lldb_private::ValueObjectDynamicValue::GetTypeName().
|
inline |
Definition at line 744 of file Type.h.
References HasCompilerType().
Referenced by lldb_private::ValueObjectDynamicValue::CalculateNumChildren(), lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::GNUstepObjCRuntime::FixUpDynamicType(), lldb_private::ValueObjectDynamicValue::GetByteSize(), lldb_private::ValueObjectDynamicValue::GetCompilerTypeImpl(), lldb_private::ValueObjectDynamicValue::GetDisplayTypeName(), and lldb_private::ValueObjectDynamicValue::UpdateValue().
bool TypeAndOrName::IsEmpty | ( | ) | const |
Definition at line 898 of file Type.cpp.
References m_compiler_type, and m_type_name.
Referenced by lldb_private::AppleObjCRuntimeV1::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), and operator bool().
|
inlineexplicit |
bool TypeAndOrName::operator!= | ( | const TypeAndOrName & | other | ) | const |
bool TypeAndOrName::operator== | ( | const TypeAndOrName & | other | ) | const |
Definition at line 852 of file Type.cpp.
References m_compiler_type, and m_type_name.
void TypeAndOrName::SetCompilerType | ( | CompilerType | compiler_type | ) |
Definition at line 892 of file Type.cpp.
References lldb_private::CompilerType::GetTypeName(), m_compiler_type, and m_type_name.
Referenced by lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::GNUstepObjCRuntime::FixUpDynamicType(), and lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress().
void TypeAndOrName::SetName | ( | const char * | type_name_cstr | ) |
Definition at line 876 of file Type.cpp.
References m_type_name, and lldb_private::ConstString::SetCString().
void TypeAndOrName::SetName | ( | ConstString | type_name | ) |
Definition at line 872 of file Type.cpp.
References m_type_name.
Referenced by lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::GNUstepObjCRuntime::FixUpDynamicType(), lldb_private::AppleObjCRuntimeV1::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), and lldb_private::ItaniumABILanguageRuntime::GetTypeInfo().
void TypeAndOrName::SetName | ( | llvm::StringRef | name | ) |
Definition at line 880 of file Type.cpp.
References m_type_name, and lldb_private::ConstString::SetString().
void TypeAndOrName::SetTypeSP | ( | lldb::TypeSP | type_sp | ) |
Definition at line 884 of file Type.cpp.
References Clear(), m_compiler_type, and m_type_name.
Referenced by lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), and lldb_private::ItaniumABILanguageRuntime::GetTypeInfo().
|
private |
Definition at line 751 of file Type.h.
Referenced by Clear(), GetCompilerType(), GetName(), HasCompilerType(), IsEmpty(), operator==(), SetCompilerType(), SetTypeSP(), and TypeAndOrName().
|
private |
Definition at line 752 of file Type.h.
Referenced by Clear(), GetName(), HasName(), IsEmpty(), operator==(), SetCompilerType(), SetName(), SetTypeSP(), and TypeAndOrName().