[Lldb-commits] [lldb] [lldb] Replace ConstString in FormatEntity.cpp (PR #225523)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 22 14:03:25 PDT 2026
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/225523
None
>From cd674aeeebcfbd5a77ef8672fe29660f0df212e5 Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford at apple.com>
Date: Tue, 22 Sep 2026 14:02:54 -0700
Subject: [PATCH] [lldb] Replace ConstString in FormatEntity.cpp
---
lldb/source/Core/FormatEntity.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index e886453a45908d..7d9856b615f4cb 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -41,7 +41,6 @@
#include "lldb/Utility/AnsiTerminal.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/CompletionRequest.h"
-#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
@@ -1004,9 +1003,12 @@ bool FormatEntity::Formatter::DumpValue(Stream &s,
llvm::StringRef special_directions;
if (close_bracket_index != llvm::StringRef::npos &&
subpath.size() > close_bracket_index) {
- ConstString additional_data(subpath.drop_front(close_bracket_index + 1));
- special_directions_stream.Printf("${%svar%s", do_deref_pointer ? "*" : "",
- additional_data.GetCString());
+ llvm::StringRef additional_data(
+ subpath.drop_front(close_bracket_index + 1));
+ special_directions_stream
+ << "${"
+ << llvm::formatv("{0}var{1}", do_deref_pointer ? "*" : "",
+ additional_data);
if (entry.fmt != eFormatDefault) {
const char format_char =
More information about the lldb-commits
mailing list