[Lldb-commits] [lldb] [lldb][NFC] Replace prefix/suffix variables with ColorSetting (PR #210671)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 20 03:38:41 PDT 2026


================
@@ -712,9 +712,10 @@ size_t SourceManager::File::DisplaySourceLines(
 
   // If we should mark the stop column with color codes, then copy the prefix
   // and suffix to our color style.
-  if (should_show_stop_column_with_ansi(debugger_sp))
-    style.selected.Set(debugger_sp->GetStopShowColumnAnsiPrefix(),
-                       debugger_sp->GetStopShowColumnAnsiSuffix());
+  if (should_show_stop_column_with_ansi(debugger_sp)) {
+    ColorSetting color = debugger_sp->GetStopShowColumnColor();
+    style.selected.Set(color.GetPrefix(), color.GetSuffix());
----------------
DavidSpickett wrote:

For a follow up, ColorSetting looks a lot like HighlightStyle::ColorStyle. I'm not sure you can share the type well enough to make it worth it, but worth looking at whether `Set(ColorSetting ...)` would be neater.

This appears to be the only caller outside of HighlightStyle.

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


More information about the lldb-commits mailing list