mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:50:51 +08:00
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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user