[PATCH] D102736: Fix tmp files being left on Windows builds.
Amy Huang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 18 16:49:33 PDT 2021
akhuang added inline comments.
================
Comment at: clang/lib/Frontend/CompilerInstance.cpp:872
// using stdin.
+ void *FileHandle = nullptr;
+#ifdef _WIN32
----------------
I'm saving the windows HANDLE here instead of using `fd` because for some reason calling `_get_osfhandle(fd)` in `UnmarkFileForDeletion` fails.
It also doesn't work if I don't duplicate the handle, but I don't entirely understand why. (I think when we try to rename the file, it fails with file not found, so maybe it gets deleted?)
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