https://github.com/aabhinavg created https://github.com/llvm/llvm-project/pull/92565
Summary of Changes: Replaced the ineffective call to `substr` with a more efficient use of `resize` to truncate the string. Adjusted the code to use 'resize' instead of 'substr' for better performance and readability. Removed unwanted file from the previous commit. Fixes: #91209 >From 13fefb6846b6641900843c37746b03140063a955 Mon Sep 17 00:00:00 2001 From: aabhinavg <tiwariabhina...@gmail.com> Date: Fri, 17 May 2024 21:17:51 +0530 Subject: [PATCH] removed unwanted file --- lldb/source/Core/Debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 9951fbcd3e7c3..70303173925e3 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -2067,7 +2067,7 @@ void Debugger::HandleProgressEvent(const lldb::EventSP &event_sp) { const uint32_t term_width = GetTerminalWidth(); const uint32_t ellipsis = 3; if (message.size() + ellipsis >= term_width) - message = message.substr(0, term_width - ellipsis); + message.resize(message.size() - ellipsis); const bool use_color = GetUseColor(); llvm::StringRef ansi_prefix = GetShowProgressAnsiPrefix(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits