diff options
| author | JOE1994 <joseph942010@gmail.com> | 2024-09-16 18:46:51 -0400 |
|---|---|---|
| committer | JOE1994 <joseph942010@gmail.com> | 2024-09-16 23:23:25 -0400 |
| commit | 884221eddb9d395830704fac79fd04008e02e368 (patch) | |
| tree | 854abb378ee82c6840fe16dd20837decae6f2e2d /mlir/lib/Debug/Observers/ActionProfiler.cpp | |
| parent | 64aaf0559d9333dc00c04bb581739ddc5da358b2 (diff) | |
[mlir] Tidy uses of llvm::raw_stream_ostream (NFC)
As specified in the docs,
1) raw_string_ostream is always unbuffered and
2) the underlying buffer may be used directly
( 65b13610a5226b84889b923bae884ba395ad084d for further reference )
* Don't call raw_string_ostream::flush(), which is essentially a no-op.
* Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection.
Diffstat (limited to 'mlir/lib/Debug/Observers/ActionProfiler.cpp')
| -rw-r--r-- | mlir/lib/Debug/Observers/ActionProfiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Debug/Observers/ActionProfiler.cpp b/mlir/lib/Debug/Observers/ActionProfiler.cpp index 07bf9fd0ccc7..a6b7d5e18aa0 100644 --- a/mlir/lib/Debug/Observers/ActionProfiler.cpp +++ b/mlir/lib/Debug/Observers/ActionProfiler.cpp @@ -58,6 +58,6 @@ void ActionProfiler::print(const ActionActiveStack *action, if (printComma) os << ",\n"; printComma = true; - os << event.str(); + os << str; os.flush(); } |
