Cleanup to the ObjC runtime to remove the now useless ClassDescriptor_Invalid
llvm-svn: 177558
This commit is contained in:
parent
9dc5489441
commit
bdbda93f35
|
@ -201,6 +201,9 @@ public:
|
|||
|
||||
lldb::clang_type_t
|
||||
GetBuiltInType_objc_id();
|
||||
|
||||
static lldb::clang_type_t
|
||||
GetBuiltInType_objc_id(clang::ASTContext *ast);
|
||||
|
||||
lldb::clang_type_t
|
||||
GetBuiltInType_objc_Class();
|
||||
|
|
|
@ -249,41 +249,6 @@ public:
|
|||
lldb::TypeWP m_type_wp;
|
||||
};
|
||||
|
||||
// a convenience subclass of ClassDescriptor meant to represent invalid objects
|
||||
class ClassDescriptor_Invalid : public ClassDescriptor
|
||||
{
|
||||
public:
|
||||
ClassDescriptor_Invalid() {}
|
||||
|
||||
virtual
|
||||
~ClassDescriptor_Invalid ()
|
||||
{}
|
||||
|
||||
virtual ConstString
|
||||
GetClassName () { return ConstString(""); }
|
||||
|
||||
virtual ClassDescriptorSP
|
||||
GetSuperclass () { return ClassDescriptorSP(new ClassDescriptor_Invalid()); }
|
||||
|
||||
virtual bool
|
||||
IsValid () { return false; }
|
||||
|
||||
virtual bool
|
||||
IsTagged () { return false; }
|
||||
|
||||
virtual uint64_t
|
||||
GetInstanceSize () { return 0; }
|
||||
|
||||
virtual ObjCISA
|
||||
GetISA () { return 0; }
|
||||
|
||||
virtual bool
|
||||
CheckPointer (lldb::addr_t value, uint32_t ptr_size) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
virtual ClassDescriptorSP
|
||||
GetClassDescriptor (ValueObject& in_value);
|
||||
|
||||
|
|
|
@ -55,8 +55,9 @@ lldb_private::formatters::NSBundleSummaryProvider (ValueObject& valobj, Stream&
|
|||
if (!strcmp(class_name,"NSBundle"))
|
||||
{
|
||||
uint64_t offset = 5 * ptr_size;
|
||||
ClangASTType type(valobj.GetClangAST(),valobj.GetClangType());
|
||||
ClangASTType type(valobj.GetClangAST(),ClangASTContext::GetBuiltInType_objc_id(valobj.GetClangAST()));
|
||||
ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset, type, true));
|
||||
valobj_addr = text->GetValueAsUnsigned(0);
|
||||
StreamString summary_stream;
|
||||
bool was_nsstring_ok = NSStringSummaryProvider(*text.get(), summary_stream);
|
||||
if (was_nsstring_ok && summary_stream.GetSize() > 0)
|
||||
|
|
|
@ -1508,7 +1508,7 @@ public:
|
|||
// tagged pointers can represent a class that has a superclass, but since that information is not
|
||||
// stored in the object itself, we would have to query the runtime to discover the hierarchy
|
||||
// for the time being, we skip this step in the interest of static discovery
|
||||
return ObjCLanguageRuntime::ClassDescriptorSP(new ObjCLanguageRuntime::ClassDescriptor_Invalid());
|
||||
return ObjCLanguageRuntime::ClassDescriptorSP();
|
||||
}
|
||||
|
||||
virtual bool
|
||||
|
|
|
@ -944,6 +944,12 @@ ClangASTContext::GetBuiltInType_objc_id()
|
|||
return getASTContext()->getObjCIdType().getAsOpaquePtr();
|
||||
}
|
||||
|
||||
lldb::clang_type_t
|
||||
ClangASTContext::GetBuiltInType_objc_id(clang::ASTContext *ast)
|
||||
{
|
||||
return ast->getObjCIdType().getAsOpaquePtr();
|
||||
}
|
||||
|
||||
clang_type_t
|
||||
ClangASTContext::GetBuiltInType_objc_Class()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue