[PATCH] D40094: LTO: clarify why we need to gracefully handle sys::fs::rename failures

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 12:03:32 PST 2017


pcc added inline comments.


================
Comment at: llvm/lib/LTO/Caching.cpp:77
+        // fail with a permission denied error (for example, if the destination
+        // is currently mmapped). Since the existing file should be semantically
+        // equivalent to the one we are trying to write, we give AddBuffer a
----------------
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.


https://reviews.llvm.org/D40094





More information about the llvm-commits mailing list