[PATCH] D102736: Fix tmp files being left on Windows builds.

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 9 14:53:22 PDT 2021


rnk added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInstance.cpp:857-858
+      OS.reset(new llvm::raw_fd_ostream(Temp->FD, /*shouldClose=*/false,
+                                        Binary ? llvm::sys::fs::OF_None
+                                               : llvm::sys::fs::OF_Text));
+      OSFile = std::string(TempPath.str());
----------------
I think the bug is here: the third parameter is `bool unbuffered`, not file flags, so we are opening the file for unbuffered writing, and that is really slow.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102736/new/

https://reviews.llvm.org/D102736



More information about the cfe-commits mailing list