This revision was automatically updated to reflect the committed changes. Closed by commit rL243716: Allow ValueObject::Dereference to dereference references. (authored by chaoren).
Changed prior to commit: http://reviews.llvm.org/D11667?vs=31084&id=31091#toc Repository: rL LLVM http://reviews.llvm.org/D11667 Files: lldb/trunk/source/Core/ValueObject.cpp Index: lldb/trunk/source/Core/ValueObject.cpp =================================================================== --- lldb/trunk/source/Core/ValueObject.cpp +++ lldb/trunk/source/Core/ValueObject.cpp @@ -3711,9 +3711,9 @@ { if (m_deref_valobj) return m_deref_valobj->GetSP(); - - const bool is_pointer_type = IsPointerType(); - if (is_pointer_type) + + const bool is_pointer_or_reference_type = IsPointerOrReferenceType(); + if (is_pointer_or_reference_type) { bool omit_empty_base_classes = true; bool ignore_array_bounds = false; @@ -3730,7 +3730,7 @@ ClangASTType child_clang_type; ExecutionContext exe_ctx (GetExecutionContextRef()); - + child_clang_type = clang_type.GetChildClangTypeAtIndex (&exe_ctx, 0, transparent_pointers, @@ -3773,10 +3773,10 @@ StreamString strm; GetExpressionPath(strm, true); - if (is_pointer_type) + if (is_pointer_or_reference_type) error.SetErrorStringWithFormat("dereference failed: (%s) %s", GetTypeName().AsCString("<invalid type>"), strm.GetString().c_str()); else - error.SetErrorStringWithFormat("not a pointer type: (%s) %s", GetTypeName().AsCString("<invalid type>"), strm.GetString().c_str()); + error.SetErrorStringWithFormat("not a pointer or reference type: (%s) %s", GetTypeName().AsCString("<invalid type>"), strm.GetString().c_str()); return ValueObjectSP(); } }
Index: lldb/trunk/source/Core/ValueObject.cpp =================================================================== --- lldb/trunk/source/Core/ValueObject.cpp +++ lldb/trunk/source/Core/ValueObject.cpp @@ -3711,9 +3711,9 @@ { if (m_deref_valobj) return m_deref_valobj->GetSP(); - - const bool is_pointer_type = IsPointerType(); - if (is_pointer_type) + + const bool is_pointer_or_reference_type = IsPointerOrReferenceType(); + if (is_pointer_or_reference_type) { bool omit_empty_base_classes = true; bool ignore_array_bounds = false; @@ -3730,7 +3730,7 @@ ClangASTType child_clang_type; ExecutionContext exe_ctx (GetExecutionContextRef()); - + child_clang_type = clang_type.GetChildClangTypeAtIndex (&exe_ctx, 0, transparent_pointers, @@ -3773,10 +3773,10 @@ StreamString strm; GetExpressionPath(strm, true); - if (is_pointer_type) + if (is_pointer_or_reference_type) error.SetErrorStringWithFormat("dereference failed: (%s) %s", GetTypeName().AsCString("<invalid type>"), strm.GetString().c_str()); else - error.SetErrorStringWithFormat("not a pointer type: (%s) %s", GetTypeName().AsCString("<invalid type>"), strm.GetString().c_str()); + error.SetErrorStringWithFormat("not a pointer or reference type: (%s) %s", GetTypeName().AsCString("<invalid type>"), strm.GetString().c_str()); return ValueObjectSP(); } }
_______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits