From de019b88dd5804ec996fe8c12cddcc6feb13afa1 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 9 Jun 2020 10:21:09 -0700 Subject: [lldb/Interpreter] Support color in CommandReturnObject Color the error: and warning: part of the CommandReturnObject output, similar to how an error is printed from the driver when colors are enabled. Differential revision: https://reviews.llvm.org/D81058 --- lldb/source/Commands/CommandObjectExpression.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectExpression.cpp') diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 7cec714..b23adb0 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -500,7 +500,8 @@ void CommandObjectExpression::IOHandlerInputComplete(IOHandler &io_handler, StreamFileSP output_sp = io_handler.GetOutputStreamFileSP(); StreamFileSP error_sp = io_handler.GetErrorStreamFileSP(); - CommandReturnObject return_obj; + CommandReturnObject return_obj( + GetCommandInterpreter().GetDebugger().GetUseColor()); EvaluateExpression(line.c_str(), *output_sp, *error_sp, return_obj); if (output_sp) output_sp->Flush(); -- cgit v1.1