[Lldb-commits] [lldb] [lldb] Add color support to StreamString (PR #77380)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 8 13:45:18 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Pete Lawrence (PortalPete)
<details>
<summary>Changes</summary>
This change just adds a `bool colors` parameter to the `StreamString` class's constructor, which it passes up to its superclass’s constructor.
rdar://120671168
---
Full diff: https://github.com/llvm/llvm-project/pull/77380.diff
2 Files Affected:
- (modified) lldb/include/lldb/Utility/StreamString.h (+1-1)
- (modified) lldb/source/Utility/StreamString.cpp (+1-1)
``````````diff
diff --git a/lldb/include/lldb/Utility/StreamString.h b/lldb/include/lldb/Utility/StreamString.h
index 4c568acdcc6f60..3d675caf8f3f43 100644
--- a/lldb/include/lldb/Utility/StreamString.h
+++ b/lldb/include/lldb/Utility/StreamString.h
@@ -22,7 +22,7 @@ namespace lldb_private {
class StreamString : public Stream {
public:
- StreamString();
+ StreamString(bool colors = false);
StreamString(uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order);
diff --git a/lldb/source/Utility/StreamString.cpp b/lldb/source/Utility/StreamString.cpp
index 745a85b7576520..0d35ccbdbbd0f5 100644
--- a/lldb/source/Utility/StreamString.cpp
+++ b/lldb/source/Utility/StreamString.cpp
@@ -11,7 +11,7 @@
using namespace lldb;
using namespace lldb_private;
-StreamString::StreamString() : Stream(0, 4, eByteOrderBig) {}
+StreamString::StreamString(bool colors) : Stream(0, 4, eByteOrderBig, colors) {}
StreamString::StreamString(uint32_t flags, uint32_t addr_size,
ByteOrder byte_order)
``````````
</details>
https://github.com/llvm/llvm-project/pull/77380
More information about the lldb-commits
mailing list