diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-06-09 10:21:09 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-06-09 10:45:45 -0700 |
commit | de019b88dd5804ec996fe8c12cddcc6feb13afa1 (patch) | |
tree | a21779363a65262f657354b00eef1e7be681555c /lldb/source/Commands/CommandObjectExpression.cpp | |
parent | 1f48f8f6e289d3ae14d28ad9bd000ef5ba209fc0 (diff) | |
download | llvm-de019b88dd5804ec996fe8c12cddcc6feb13afa1.zip llvm-de019b88dd5804ec996fe8c12cddcc6feb13afa1.tar.gz llvm-de019b88dd5804ec996fe8c12cddcc6feb13afa1.tar.bz2 |
[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
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |