<rdar://problem/12560257>

Fixed zero sized arrays to work correctly. This will only happen once we get a clang that emits correct debug info for zero sized arrays. For now I have marked the TestStructTypes.py as an expected failure.

llvm-svn: 169465
This commit is contained in:
Greg Clayton
2012-12-06 02:33:54 +00:00
parent 16846051db
commit 4ef877f5e9
10 changed files with 468 additions and 397 deletions

View File

@@ -792,6 +792,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr,
deref = false;
}
bool is_incomplete_array = false;
if (valobj_sp->IsPointerType ())
{
bool is_objc_pointer = true;
@@ -855,11 +856,14 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr,
}
}
}
else if (ClangASTContext::IsArrayType (valobj_sp->GetClangType(), NULL, NULL))
else if (ClangASTContext::IsArrayType (valobj_sp->GetClangType(), NULL, NULL, &is_incomplete_array))
{
// Pass false to dynamic_value here so we can tell the difference between
// no dynamic value and no member of this type...
child_valobj_sp = valobj_sp->GetChildAtIndex (child_index, true);
if (!child_valobj_sp && (is_incomplete_array || no_synth_child == false))
child_valobj_sp = valobj_sp->GetSyntheticArrayMember (child_index, true);
if (!child_valobj_sp)
{
valobj_sp->GetExpressionPath (var_expr_path_strm, false);