summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-02-15 01:24:44 +0000
committerEnrico Granata <egranata@apple.com>2014-02-15 01:24:44 +0000
commit465f4bc2874333444d081386abe50c012eabfe8e (patch)
treed39bb14979f93937248c5d970c84a4da075e1f76 /lldb/source/Core/ValueObject.cpp
parent144d9a059b9b0f6fa14ece19fbcf967da9396fe8 (diff)
downloadbcm5719-llvm-465f4bc2874333444d081386abe50c012eabfe8e.tar.gz
bcm5719-llvm-465f4bc2874333444d081386abe50c012eabfe8e.zip
<rdar://problem/16006373>
Revert the spirit of r199857 - a convincing case can be made that overriding a summary's format markers behind its back is not the right thing to do This commit reverts the behavior of the code to the previous model, and changes the test case to validate the opposite of what it was validating before llvm-svn: 201455
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index cf93c86d0b5..10e5ab452f0 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -1685,12 +1685,8 @@ ValueObject::DumpPrintableRepresentation(Stream& s,
// area for cases where our desired output is not backed by some other longer-term storage
StreamString strm;
- bool reset_format = false;
- if (custom_format != eFormatInvalid && GetFormat() == lldb::eFormatDefault)
- {
- reset_format = true;
+ if (custom_format != eFormatInvalid)
SetFormat(custom_format);
- }
switch(val_obj_display)
{
@@ -1745,17 +1741,10 @@ ValueObject::DumpPrintableRepresentation(Stream& s,
}
}
-
if (cstr)
- {
s.PutCString(cstr);
- if (reset_format)
- SetFormat(lldb::eFormatDefault);
- }
else
{
- if (reset_format)
- SetFormat(lldb::eFormatDefault);
if (m_error.Fail())
{
if (do_dump_error)
@@ -1777,6 +1766,9 @@ ValueObject::DumpPrintableRepresentation(Stream& s,
// even if we have an error message as output, that's a success
// from our callers' perspective, so return true
var_success = true;
+
+ if (custom_format != eFormatInvalid)
+ SetFormat(eFormatDefault);
}
return var_success;
OpenPOWER on IntegriCloud