[Lldb-commits] [lldb] [lldb] Replace ConstString in FormatEntity.cpp (PR #225523)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 22 14:04:05 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Alex Langford (bulbazord)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/225523.diff
1 Files Affected:
- (modified) lldb/source/Core/FormatEntity.cpp (+6-4)
``````````diff
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index e886453a45908..7d9856b615f4c 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 =
``````````
</details>
https://github.com/llvm/llvm-project/pull/225523
More information about the lldb-commits
mailing list