[Lldb-commits] [lldb] [lldb] Avoid interning SBStream contents into the ConstString Pool (PR #227338)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 29 09:53:36 PDT 2026


================
@@ -86,8 +86,8 @@ lldb::SBError SBStructuredData::SetFromJSON(lldb::SBStream &stream) {
 
   lldb::SBError error;
 
-  StructuredData::ObjectSP json_obj =
-      StructuredData::ParseJSON(stream.GetData());
+  llvm::StringRef stream_data = stream.GetString();
+  StructuredData::ObjectSP json_obj = StructuredData::ParseJSON(stream_data);
----------------
da-viper wrote:

Will switch to `const char *` since we technically add null to the SBStream using `Printf("hello %c some data, 0)`.

https://github.com/llvm/llvm-project/pull/227338


More information about the lldb-commits mailing list