forked from OSchip/llvm-project
<rdar://problem/14194140>
Adding support for correctly extracting children out of vector types for data formatter purposes llvm-svn: 184262
This commit is contained in:
parent
2aabb06175
commit
08a1bb8199
|
@ -2792,7 +2792,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr,
|
|||
}
|
||||
case '[':
|
||||
{
|
||||
if (!root_clang_type_info.Test(ClangASTContext::eTypeIsArray) && !root_clang_type_info.Test(ClangASTContext::eTypeIsPointer)) // if this is not a T[] nor a T*
|
||||
if (!root_clang_type_info.Test(ClangASTContext::eTypeIsArray) && !root_clang_type_info.Test(ClangASTContext::eTypeIsPointer) && !root_clang_type_info.Test(ClangASTContext::eTypeIsVector)) // if this is not a T[] nor a T*
|
||||
{
|
||||
if (!root_clang_type_info.Test(ClangASTContext::eTypeIsScalar)) // if this is not even a scalar...
|
||||
{
|
||||
|
@ -2914,7 +2914,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr,
|
|||
{
|
||||
if (ClangASTType::GetMinimumLanguage(root->GetClangAST(),
|
||||
root->GetClangType()) == eLanguageTypeObjC
|
||||
&& ClangASTContext::IsPointerType(ClangASTType::GetPointeeType(root->GetClangType())) == false
|
||||
&& pointee_clang_type_info.AllClear(ClangASTContext::eTypeIsPointer)
|
||||
&& root->HasSyntheticValue()
|
||||
&& options.m_no_synthetic_children == false)
|
||||
{
|
||||
|
@ -2937,7 +2937,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr,
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (ClangASTContext::IsScalarType(root_clang_type))
|
||||
else if (root_clang_type_info.Test(ClangASTContext::eTypeIsScalar))
|
||||
{
|
||||
root = root->GetSyntheticBitFieldChild(index, index, true);
|
||||
if (!root.get())
|
||||
|
@ -2955,6 +2955,23 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr,
|
|||
return root;
|
||||
}
|
||||
}
|
||||
else if (root_clang_type_info.Test(ClangASTContext::eTypeIsVector))
|
||||
{
|
||||
root = root->GetChildAtIndex(index, true);
|
||||
if (!root.get())
|
||||
{
|
||||
*first_unparsed = expression_cstr;
|
||||
*reason_to_stop = ValueObject::eExpressionPathScanEndReasonNoSuchChild;
|
||||
*final_result = ValueObject::eExpressionPathEndResultTypeInvalid;
|
||||
return ValueObjectSP();
|
||||
}
|
||||
else
|
||||
{
|
||||
*first_unparsed = end+1; // skip ]
|
||||
*final_result = ValueObject::eExpressionPathEndResultTypePlain;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (options.m_no_synthetic_children == false)
|
||||
{
|
||||
if (root->HasSyntheticValue())
|
||||
|
|
|
@ -2996,6 +2996,11 @@ ClangASTContext::GetTypeInfo
|
|||
break;
|
||||
|
||||
case clang::BuiltinType::ObjCSel:
|
||||
if (ast && pointee_or_element_clang_type)
|
||||
*pointee_or_element_clang_type = ast->CharTy.getAsOpaquePtr();
|
||||
builtin_type_flags |= eTypeIsPointer | eTypeIsObjC;
|
||||
break;
|
||||
|
||||
case clang::BuiltinType::Bool:
|
||||
case clang::BuiltinType::Char_U:
|
||||
case clang::BuiltinType::UChar:
|
||||
|
|
Loading…
Reference in New Issue