[llvm] [llvm] Avoid 'raw_string_ostream::str()' (NFC) (PR #96995)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 12:44:48 PDT 2024


================
@@ -148,7 +148,7 @@ std::string CompleteNodeLabelString(
   std::string Str;
   raw_string_ostream OS(Str);
   HandleBasicBlock(OS, *Node);
----------------
kazutakahirata wrote:

Could we rename `Str` to `OutStr` and drop the copy construction?

```suggestion
  std::string OutStr;
  raw_string_ostream OS(OutStr);
  HandleBasicBlock(OS, *Node);
```

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


More information about the llvm-commits mailing list