[PATCH] D68193: In openFileForRead don't cache erroneous entries if the error relates to them being directories. Add tests.
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 15:39:33 PDT 2019
dexonsmith added a comment.
Sorry for bouncing you around, but I just had a look at the other user of `createFileEntry` and I think the right thing to do is to somehow share the code between `DependencyScanningWorkerFilesystem::status` and this. I suggest splitting a function out of `status` (called `getOrCreateFileSystemEntry`?) that returns a `CachedFileSystemEntry` (or an error).
The fix I just asked you to make (to only call `stat` once) could be done on `getOrCreateFileSystemEntry` as a follow-up, using `std::unique_ptr<llvm::vfs::File>` and changing `getFileEntry` to take that instead of a filename.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68193/new/
https://reviews.llvm.org/D68193
More information about the cfe-commits
mailing list