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

>From 749306f161b925e502ad85577dd99ed89216e3c3 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 ab6af1138f902..4328f04a36891 100644
--- a/llvm/lib/Support/Mustache.cpp
+++ b/llvm/lib/Support/Mustache.cpp
@@ -686,8 +686,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