- Fixed a bug where ::Describe for class descriptors

would fail if the class had no ivars.

- Updated use of the RealizeType API by the class
  descriptors to use "for_expression" rather than
  the misnamed "allow_unknownanytype."

llvm-svn: 220980
This commit is contained in:
Sean Callanan 2014-10-31 18:05:26 +00:00
parent a330933f15
commit b678b90749
1 changed files with 19 additions and 16 deletions

View File

@ -389,6 +389,8 @@ ClassDescriptorV2::Describe (std::function <void (ObjCLanguageRuntime::ObjCISA)>
}
if (ivar_func)
{
if (class_ro->m_ivars_ptr != 0)
{
ivar_list_t ivar_list;
if (!ivar_list.Read(process, class_ro->m_ivars_ptr))
@ -407,6 +409,7 @@ ClassDescriptorV2::Describe (std::function <void (ObjCLanguageRuntime::ObjCISA)>
break;
}
}
}
return true;
}
@ -524,9 +527,9 @@ ClassDescriptorV2::iVarsStorage::fill (AppleObjCRuntimeV2& runtime, ClassDescrip
nullptr,
nullptr,
[this,process,encoding_to_type_sp](const char * name, const char * type, lldb::addr_t offset_ptr, uint64_t size) -> bool {
const bool allow_unknownanytype = false;
const bool for_expression = false;
const bool stop_loop = false;
ClangASTType ivar_type = encoding_to_type_sp->RealizeType(type, allow_unknownanytype);
ClangASTType ivar_type = encoding_to_type_sp->RealizeType(type, for_expression);
if (ivar_type)
{
Scalar offset_scalar;