[lldb/Interpreter] Support color in CommandReturnObject
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 9 Jun 2020 17:21:09 +0000 (10:21 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 9 Jun 2020 17:45:45 +0000 (10:45 -0700)
commitde019b88dd5804ec996fe8c12cddcc6feb13afa1
treea21779363a65262f657354b00eef1e7be681555c
parent1f48f8f6e289d3ae14d28ad9bd000ef5ba209fc0
[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
19 files changed:
lldb/include/lldb/Interpreter/CommandReturnObject.h
lldb/include/lldb/Utility/Stream.h
lldb/include/lldb/Utility/StreamTee.h
lldb/source/API/SBCommandReturnObject.cpp
lldb/source/Breakpoint/BreakpointOptions.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/source/Expression/REPL.cpp
lldb/source/Interpreter/CommandAlias.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Interpreter/CommandReturnObject.cpp
lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/source/Target/Target.cpp
lldb/source/Utility/Stream.cpp
lldb/test/Shell/Driver/TestNoUseColor.test
lldb/test/Shell/Driver/TestUseColor.test [new file with mode: 0644]
lldb/tools/lldb-test/lldb-test.cpp
lldb/unittests/ScriptInterpreter/Lua/ScriptInterpreterTests.cpp