This is an archive of the discontinued LLVM Phabricator instance.

LTO: clarify why we need to gracefully handle sys::fs::rename failures
ClosedPublic

Authored by inglorion on Nov 15 2017, 11:54 AM.

Event Timeline

inglorion created this revision.Nov 15 2017, 11:54 AM

D39993 showed that it is not clear why the special case for sys::fs::rename failing with permission_denied exists. @pcc, @rafael, does this comment make it clearer?

pcc added inline comments.Nov 15 2017, 12:03 PM
llvm/lib/LTO/Caching.cpp
77

The implementation already tries to handle this case by renaming the destination file. Probably the example that I'd choose is that the destination may have been opened by another process without sharing.

pcc accepted this revision.Nov 15 2017, 4:05 PM

LGTM, thanks.

This revision is now accepted and ready to land.Nov 15 2017, 4:05 PM
This revision was automatically updated to reflect the committed changes.