From 2b2631c9150a95e12b557e5c35ebf06b7bf71dac Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Thu, 9 Aug 2012 16:51:25 +0000 Subject: Stripping off the object's type from the output of the 'po' command llvm-svn: 161592 --- lldb/source/Core/ValueObject.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lldb/source/Core/ValueObject.cpp') 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(""); //const char* typeName = valobj->GetTypeName().AsCString(""); -- cgit v1.2.3