https://github.com/ilovepi updated 
https://github.com/llvm/llvm-project/pull/159195

>From 59b5eda10dc04201b5d68ff5af08b5f9f61ddf5a Mon Sep 17 00:00:00 2001
From: Paul Kirth <[email protected]>
Date: Mon, 15 Sep 2025 19:54:34 -0700
Subject: [PATCH] [llvm][mustache] Avoid extra copy for json strings

---
 llvm/lib/Support/Mustache.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/lib/Support/Mustache.cpp b/llvm/lib/Support/Mustache.cpp
index eadf4c1f7cda9..30ced31bd7c43 100644
--- a/llvm/lib/Support/Mustache.cpp
+++ b/llvm/lib/Support/Mustache.cpp
@@ -698,8 +698,7 @@ static void toMustacheString(const json::Value &Data, 
raw_ostream &OS) {
     return;
   }
   case json::Value::String: {
-    auto Str = *Data.getAsString();
-    OS << Str.str();
+    OS << *Data.getAsString();
     return;
   }
 

_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to