diff options
author | Paul Kirth <paulkirth@google.com> | 2025-09-15 19:54:34 -0700 |
---|---|---|
committer | Paul Kirth <paulkirth@google.com> | 2025-09-25 18:52:04 -0700 |
commit | 5b2c23c1e0555ae80b1d336e207bdae3c9533c5e (patch) | |
tree | af360ec551e5ceccbb9de761c186403b4391e764 | |
parent | 2a32dcd09cc7aa2c06c16ad59b499a12d3b75e30 (diff) | |
download | llvm-users/ilovepi/mustache-json-copy-opt.zip llvm-users/ilovepi/mustache-json-copy-opt.tar.gz llvm-users/ilovepi/mustache-json-copy-opt.tar.bz2 |
[llvm][mustache] Avoid extra copy for json stringsusers/ilovepi/mustache-json-copy-opt
-rw-r--r-- | llvm/lib/Support/Mustache.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/Mustache.cpp b/llvm/lib/Support/Mustache.cpp index ab6af1138..4328f04 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; } |