diff options
| author | Enrico Granata <egranata@apple.com> | 2012-12-14 00:52:54 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2012-12-14 00:52:54 +0000 |
| commit | dc3f4f90d1c1b291c2a7797e53a4e7097b0b443d (patch) | |
| tree | da1e1fa3cc276dea38fc8b68281a5d33e74b7628 /lldb/tools/driver/Driver.cpp | |
| parent | 3b606d6fd5e2981109bf98669870ba65e7e59599 (diff) | |
| download | bcm5719-llvm-dc3f4f90d1c1b291c2a7797e53a4e7097b0b443d.tar.gz bcm5719-llvm-dc3f4f90d1c1b291c2a7797e53a4e7097b0b443d.zip | |
Trigger the display of error and output in sourced commands from the result object's status instead of the presence of text in the error stream
This should be more consistent with the notion of command success/failure and avoids spewing warnings that the user might not care about
There will need to be an option to specify the level of verbosity desired (never show anything, only show failures, errors and warning, everything)
llvm-svn: 170167
Diffstat (limited to 'lldb/tools/driver/Driver.cpp')
| -rw-r--r-- | lldb/tools/driver/Driver.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index 3c62a65ff8e..fbedc1da8d6 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -1349,13 +1349,14 @@ Driver::MainLoop () } // if the command sourcing generated an error - dump the result object - const size_t error_size = result.GetErrorSize(); - if (error_size > 0) + if (result.Succeeded() == false) { const size_t output_size = result.GetOutputSize(); if (output_size > 0) m_io_channel_ap->OutWrite (result.GetOutput(dump_stream_only_if_no_immediate), output_size, NO_ASYNC); - m_io_channel_ap->OutWrite (result.GetError(dump_stream_only_if_no_immediate), error_size, NO_ASYNC); + const size_t error_size = result.GetErrorSize(); + if (error_size > 0) + m_io_channel_ap->OutWrite (result.GetError(dump_stream_only_if_no_immediate), error_size, NO_ASYNC); } result.Clear(); |

