LTO/Caching.cpp uses file rename to atomically set the value for a
cache key. On Windows, this fails when the destination file already
exists. Previously, LLVM would report_fatal_error in such
cases. However, because the old and the new value for the cache key
are supposed to be equivalent, it actually doesn't matter which one we
keep. This change makes it so that failing the rename when an openable
file with the desired name already exists causes us to report success
instead of fataling.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 12045 Build 12045: arc lint + arc unit
Event Timeline
llvm/lib/LTO/Caching.cpp | ||
---|---|---|
83 | I think this can race with the cache pruner. Maybe in this case you could create a copy of MBOrErr in memory, then close and delete the temporary file and return the copy to the client. |
Comment Actions
LGTM
llvm/lib/Support/Windows/Path.inc | ||
---|---|---|
737–739 | This is part of an unrelated change, right? |
I think this can race with the cache pruner.
Maybe in this case you could create a copy of MBOrErr in memory, then close and delete the temporary file and return the copy to the client.