aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorYoungsuk Kim <joseph942010@gmail.com>2024-07-01 21:52:37 -0400
committerGitHub <noreply@github.com>2024-07-01 21:52:37 -0400
commita95c85fba5fde0db8f128cf5564ac333e2b1f90f (patch)
tree33e65940496208c76803c15d2d0f38006ee9fcde /llvm/lib/CodeGen/MachineScheduler.cpp
parent9b8c2fae38bcff0b16d996ee002ff1e989fa23ea (diff)
downloadllvm-a95c85fba5fde0db8f128cf5564ac333e2b1f90f.zip
llvm-a95c85fba5fde0db8f128cf5564ac333e2b1f90f.tar.gz
llvm-a95c85fba5fde0db8f128cf5564ac333e2b1f90f.tar.bz2
[llvm][CodeGen] Avoid 'raw_string_ostream::str' (NFC) (#97318)
Since `raw_string_ostream` doesn't own the string buffer, it is desirable (in terms of memory safety) for users to directly reference the string buffer rather than use `raw_string_ostream::str()`. Work towards TODO comment to remove `raw_string_ostream::str()`.
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index cf72f74..4a6d5ed 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -4413,7 +4413,7 @@ struct DOTGraphTraits<ScheduleDAGMI*> : public DefaultDOTGraphTraits {
SS << "SU:" << SU->NodeNum;
if (DFS)
SS << " I:" << DFS->getNumInstrs(SU);
- return SS.str();
+ return Str;
}
static std::string getNodeDescription(const SUnit *SU, const ScheduleDAG *G) {