[PATCH] D37410: LTO: Try to open cache files before renaming them.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 18:00:38 PDT 2017


zturner added a comment.

I think you actually can rename open files on Windows.  Or at least, you can try to.  I'll have to dig in when I have a bit more time though to see if there's any weird things we need to be aware of when doing it, or casse where it won't work.

But basically, what you do is call `SetFileInformationByHandle` and set the `FileInformationClass` parameter to `FileRenameInfo`, and fill out a `FILE_RENAME_INFO` structure to pass for the 3rd argument.


https://reviews.llvm.org/D37410





More information about the llvm-commits mailing list