[Lldb-commits] [lldb] [lldb] refactor highlighting function for image lookup command (PR #76112)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 19 03:44:45 PST 2024


================
@@ -260,10 +271,9 @@ class Stream {
   ///     The ANSI color code to end colorization. This is
   ///     environment-dependent.
 
-  void PutCStringColorHighlighted(llvm::StringRef text,
-                                  llvm::StringRef pattern = "",
-                                  llvm::StringRef prefix = "",
-                                  llvm::StringRef suffix = "");
+  void PutCStringColorHighlighted(
+      llvm::StringRef text,
+      std::optional<HighlightSettings> pattern_info = std::nullopt);
----------------
DavidSpickett wrote:

`pattern_info` relates to the old way of doing it more than this.

How about `settings`? It will be obvious that it's settings for highlighting because it's in `PutCStringColorHighlighted`.

https://github.com/llvm/llvm-project/pull/76112


More information about the lldb-commits mailing list