This revision was automatically updated to reflect the committed changes. Closed by commit rG2d133867833f: Frontend: Delete output streams before closing CompilerInstance outputs (authored by dexonsmith).
Changed prior to commit: https://reviews.llvm.org/D124635?vs=425893&id=425946#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124635/new/ https://reviews.llvm.org/D124635 Files: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp clang/lib/Frontend/PrecompiledPreamble.cpp clang/tools/driver/cc1_main.cpp Index: clang/tools/driver/cc1_main.cpp =================================================================== --- clang/tools/driver/cc1_main.cpp +++ clang/tools/driver/cc1_main.cpp @@ -260,8 +260,7 @@ Path.str(), /*Binary=*/false, /*RemoveFileOnSignal=*/false, /*useTemporary=*/false)) { llvm::timeTraceProfilerWrite(*profilerOutput); - // FIXME(ibiryukov): make profilerOutput flush in destructor instead. - profilerOutput->flush(); + profilerOutput.reset(); llvm::timeTraceProfilerCleanup(); Clang->clearOutputFiles(false); } Index: clang/lib/Frontend/PrecompiledPreamble.cpp =================================================================== --- clang/lib/Frontend/PrecompiledPreamble.cpp +++ clang/lib/Frontend/PrecompiledPreamble.cpp @@ -248,7 +248,7 @@ if (FileOS) { *FileOS << Buffer->Data; // Make sure it hits disk now. - FileOS->flush(); + FileOS.reset(); } this->HasEmittedPreamblePCH = true; Index: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp =================================================================== --- clang/lib/ExtractAPI/ExtractAPIConsumer.cpp +++ clang/lib/ExtractAPI/ExtractAPIConsumer.cpp @@ -793,7 +793,7 @@ // FIXME: Make the kind of APISerializer configurable. SymbolGraphSerializer SGSerializer(*API, ProductName); SGSerializer.serialize(*OS); - OS->flush(); + OS.reset(); } std::unique_ptr<raw_pwrite_stream>
Index: clang/tools/driver/cc1_main.cpp =================================================================== --- clang/tools/driver/cc1_main.cpp +++ clang/tools/driver/cc1_main.cpp @@ -260,8 +260,7 @@ Path.str(), /*Binary=*/false, /*RemoveFileOnSignal=*/false, /*useTemporary=*/false)) { llvm::timeTraceProfilerWrite(*profilerOutput); - // FIXME(ibiryukov): make profilerOutput flush in destructor instead. - profilerOutput->flush(); + profilerOutput.reset(); llvm::timeTraceProfilerCleanup(); Clang->clearOutputFiles(false); } Index: clang/lib/Frontend/PrecompiledPreamble.cpp =================================================================== --- clang/lib/Frontend/PrecompiledPreamble.cpp +++ clang/lib/Frontend/PrecompiledPreamble.cpp @@ -248,7 +248,7 @@ if (FileOS) { *FileOS << Buffer->Data; // Make sure it hits disk now. - FileOS->flush(); + FileOS.reset(); } this->HasEmittedPreamblePCH = true; Index: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp =================================================================== --- clang/lib/ExtractAPI/ExtractAPIConsumer.cpp +++ clang/lib/ExtractAPI/ExtractAPIConsumer.cpp @@ -793,7 +793,7 @@ // FIXME: Make the kind of APISerializer configurable. SymbolGraphSerializer SGSerializer(*API, ProductName); SGSerializer.serialize(*OS); - OS->flush(); + OS.reset(); } std::unique_ptr<raw_pwrite_stream>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits