From 459a82e6890ff41e30d486f36c8c7ec22628bb7a Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Fri, 13 Sep 2024 19:34:30 -0400 Subject: [llvm][unittests] Don't call raw_string_ostream::flush() (NFC) raw_string_ostream::flush() is essentially a no-op (also specified in docs). Don't call it in tests that aren't meant to test 'raw_string_ostream' itself. p.s. remove a few redundant calls to raw_string_ostream::str() --- llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp') diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp index 980b627..e549128 100644 --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp @@ -1558,7 +1558,6 @@ TEST_F(DebugLineBasicFixture, VerboseOutput) { raw_string_ostream OS(Output); Parser.parseNext(RecordRecoverable, RecordUnrecoverable, &OS, /*Verbose=*/true); - OS.flush(); StringRef OutputRef(Output); size_t Pos = 0; @@ -1805,7 +1804,6 @@ struct TruncatedOpcodeFixtureBase : public CommonFixture { raw_string_ostream OS(Output); Parser.parseNext(RecordRecoverable, RecordUnrecoverable, &OS, /*Verbose=*/true); - OS.flush(); std::string LinePrefix = ("0x0000002f: 0" + Twine::utohexstr(OpcodeValue) + " ").str(); -- cgit v1.1