aboutsummaryrefslogtreecommitdiff
path: root/flang/unittests/Frontend/CodeGenActionTest.cpp
diff options
context:
space:
mode:
authorYoungsuk Kim <youngsuk.kim@hpe.com>2024-09-17 11:56:40 -0500
committerYoungsuk Kim <youngsuk.kim@hpe.com>2024-09-17 12:20:21 -0500
commitd5dd7d230ecaf8242f4429a5e3653e16bf55bcd6 (patch)
tree0d7441497468abdf3e67566065f599c9fa2d689a /flang/unittests/Frontend/CodeGenActionTest.cpp
parent64972834c193632cbc47e54c0f0c721636b077e6 (diff)
downloadllvm-d5dd7d230ecaf8242f4429a5e3653e16bf55bcd6.zip
llvm-d5dd7d230ecaf8242f4429a5e3653e16bf55bcd6.tar.gz
llvm-d5dd7d230ecaf8242f4429a5e3653e16bf55bcd6.tar.bz2
[flang] Tidy uses of raw_string_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 ) Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection.
Diffstat (limited to 'flang/unittests/Frontend/CodeGenActionTest.cpp')
-rw-r--r--flang/unittests/Frontend/CodeGenActionTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/unittests/Frontend/CodeGenActionTest.cpp b/flang/unittests/Frontend/CodeGenActionTest.cpp
index 9d798c7..5d75de0 100644
--- a/flang/unittests/Frontend/CodeGenActionTest.cpp
+++ b/flang/unittests/Frontend/CodeGenActionTest.cpp
@@ -103,7 +103,7 @@ TEST(CodeGenAction, GracefullyHandleLLVMConversionFailure) {
action.setCurrentInput(file);
consumeError(action.execute());
- ASSERT_EQ(diagnosticsOS.str(),
+ ASSERT_EQ(diagnosticOutput,
"error: Lowering to LLVM IR failed\n"
"error: failed to create the LLVM module\n");
}