[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:10:11 PDT 2026


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

None

>From dff4a13359a6d5dc011eed9e8ec8a5837a550aa7 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 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp
index 82abaeb2fba859..5f2cce04ffda46 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();
+          llvm::StringRef func_name = m_sc.GetFunctionName().GetStringRef();
           if (func_name)
-            m_title.Printf("`%s", func_name.GetCString());
+            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