diff options
| author | Enrico Granata <egranata@apple.com> | 2012-08-09 16:51:25 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2012-08-09 16:51:25 +0000 |
| commit | 2b2631c9150a95e12b557e5c35ebf06b7bf71dac (patch) | |
| tree | c55671903c7b2890285ed64cfe4141ee44008392 /lldb/source/Core/ValueObject.cpp | |
| parent | 8aba007fe1f4c91cb0424e858e0e00dcf0076c59 (diff) | |
| download | bcm5719-llvm-2b2631c9150a95e12b557e5c35ebf06b7bf71dac.tar.gz bcm5719-llvm-2b2631c9150a95e12b557e5c35ebf06b7bf71dac.zip | |
<rdar://problem/11505459> Stripping off the object's type from the output of the 'po' command
llvm-svn: 161592
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
| -rw-r--r-- | lldb/source/Core/ValueObject.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 4dc22f02039..127152e3bb4 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -3191,9 +3191,16 @@ DumpValueObject_Impl (Stream &s, } s.Indent(); - - // Always show the type for the top level items. - if (options.m_show_types || (curr_depth == 0 && !options.m_flat_output)) + + bool show_type = true; + // if we are at the root-level and been asked to hide the root's type, then hide it + if (curr_depth == 0 && options.m_hide_root_type) + show_type = false; + else + // otherwise decide according to the usual rules (asked to show types - always at the root level) + show_type = options.m_show_types || (curr_depth == 0 && !options.m_flat_output); + + if (show_type) { const char* typeName = valobj->GetQualifiedTypeName().AsCString("<invalid type>"); //const char* typeName = valobj->GetTypeName().AsCString("<invalid type>"); |

