[PATCH] D47266: Update thin-lto cache file atimes when on windows

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 10:41:13 PDT 2018


pcc added inline comments.


================
Comment at: lib/LTO/Caching.cpp:37
     ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr =
-        MemoryBuffer::getFile(EntryPath);
+        MemoryBuffer::getFile(EntryPath, -1, true, false, true);
     if (MBOrErr) {
----------------
I'd rather not add another mysterious bool parameter to `getFile` for something that only one client needs. I'd prefer if the atime update were made more explicit. Specifically, I think we should do this:
- add an OpenFlag that means "update atime"
- change this code to use `openFileForRead` passing the new OpenFlag to obtain an FD, and then pass the FD to `MemoryBuffer::getOpenFile()`.


https://reviews.llvm.org/D47266





More information about the llvm-commits mailing list