[Lldb-commits] [lldb] [lldb] Remove ConstString from IOHandlerCursesGUI.cpp (PR #225524)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 22 14:12:43 PDT 2026


https://github.com/bulbazord updated https://github.com/llvm/llvm-project/pull/225524

>From d1af77e92318b346a01c2b6454a5e40fdbdcbff6 Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford at apple.com>
Date: Tue, 22 Sep 2026 14:08:00 -0700
Subject: [PATCH] [lldb] Remove ConstString from IOHandlerCursesGUI.cpp

---
 lldb/source/Core/IOHandlerCursesGUI.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp
index 82abaeb2fba859..5e1871e3a1f510 100644
--- a/lldb/source/Core/IOHandlerCursesGUI.cpp
+++ b/lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -4347,7 +4347,8 @@ class Application {
 
     ListenerSP listener_sp(
         Listener::MakeListener("lldb.IOHandler.curses.Application"));
-    ConstString broadcaster_class_process(Process::GetStaticBroadcasterClass());
+    llvm::StringRef broadcaster_class_process(
+        Process::GetStaticBroadcasterClass());
     debugger.EnableForwardEvents(listener_sp);
 
     m_update_screen = true;
@@ -4424,8 +4425,7 @@ class Application {
             if (event_sp) {
               Broadcaster *broadcaster = event_sp->GetBroadcaster();
               if (broadcaster) {
-                // uint32_t event_type = event_sp->GetType();
-                ConstString broadcaster_class(
+                llvm::StringRef broadcaster_class(
                     broadcaster->GetBroadcasterClass());
                 if (broadcaster_class == broadcaster_class_process) {
                   m_update_screen = true;
@@ -6927,9 +6927,9 @@ class SourceFileWindowDelegate : public WindowDelegate {
         m_sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
         if (m_sc.module_sp) {
           m_title.Format("{0}", m_sc.module_sp->GetFileSpec().GetFilename());
-          ConstString func_name = m_sc.GetFunctionName();
-          if (func_name)
-            m_title.Printf("`%s", func_name.GetCString());
+          llvm::StringRef func_name = m_sc.GetFunctionName().GetStringRef();
+          if (!func_name.empty())
+            m_title.Format("`{0}", func_name);
         }
         const uint32_t frame_idx = frame_sp->GetFrameIndex();
         frame_changed = frame_idx != m_frame_idx;



More information about the lldb-commits mailing list