summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/VirtualFileSystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [VFS] Implement `RedirectingFileSystem::getRealPath`.Volodymyr Sapsai2018-11-161-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | It fixes the case when Objective-C framework is added as a subframework through a symlink. When parent framework infers a module map and fails to detect a symlink, it would add a subframework as a submodule. And when we parse module map for the subframework, we would encounter an error like > error: umbrella for module 'WithSubframework.Foo' already covers this directory By implementing `getRealPath` "an egregious but useful hack" in `ModuleMap::inferFrameworkModule` works as expected. rdar://problem/45821279 Reviewers: bruno, benlangmuir, erik.pilkington Reviewed By: bruno Subscribers: hiraditya, dexonsmith, JDevlieghere, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54245 llvm-svn: 347009
* Revert "[VFS] Add "expand tilde" argument to getRealPath."Sam McCall2018-11-091-14/+13
| | | | | | | This reverts commit r346453. This is a complex change to a widely-used interface, and was not reviewed. llvm-svn: 346500
* [VFS] Add "expand tilde" argument to getRealPath.Jonas Devlieghere2018-11-091-13/+14
| | | | | | | Add an optional argument to expand tildes in the path to mirror llvm's implementation of the corresponding function. llvm-svn: 346453
* Extend virtual file system with `isLocal` methodJonas Devlieghere2018-11-081-0/+25
| | | | | | | | Expose the `llvm::sys::fs::is_local` function through the VFS. Differential revision: https://reviews.llvm.org/D54127 llvm-svn: 346372
* [VFS] Add support for "no_push" to VFS recursive iterators.Jonas Devlieghere2018-10-311-12/+17
| | | | | | | | | | | The "regular" file system has a useful feature that makes it possible to stop recursing when using the recursive directory iterators. This functionality was missing for the VFS recursive iterator and this patch adds that. Differential revision: https://reviews.llvm.org/D53465 llvm-svn: 345793
* Add parens to fix incorrect assert check.Erich Keane2018-10-291-1/+1
| | | | | | | | && has higher priority than ||, so this assert works really oddly. Add parens to match the programmer's intent. Change-Id: I3abe1361ee0694462190c5015779db664012f3d4 llvm-svn: 345543
* [VFS] Add property 'fallthrough' that controls fallback to real file system.Volodymyr Sapsai2018-10-261-15/+99
| | | | | | | | | | | | | | | | | | | | | | | | Default property value 'true' preserves current behavior. Value 'false' can be used to create VFS "root", file system that gives better control over which files compiler can use during compilation as there are no unpredictable accesses to real file system. Non-fallthrough use case changes how we treat multiple VFS overlay files. Instead of all of them being at the same level just above a real file system, now they are nested and subsequent overlays can refer to files in previous overlays. rdar://problem/39465552 Reviewers: bruno, benlangmuir Reviewed By: bruno Subscribers: dexonsmith, cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D50539 llvm-svn: 345431
* [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.Volodymyr Sapsai2018-10-241-22/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 'ignore-non-existent-contents' stopped working after r342232 in a way that the actual attribute value isn't used and it works as if it is always `true`. Common use case for VFS iteration is iterating through files in umbrella directories for modules. Ability to detect if some VFS entries point to non-existing files is nice but non-critical. Instead of adding back support for `'ignore-non-existent-contents': false` I am removing the attribute, because such scenario isn't used widely enough and stricter checks don't provide enough value to justify the maintenance. Change is done both in LLVM and Clang, corresponding Clang commit is r345212. rdar://problem/45176119 Reviewers: bruno Reviewed By: bruno Subscribers: hiraditya, dexonsmith, sammccall, cfe-commits Differential Revision: https://reviews.llvm.org/D53228 llvm-svn: 345213
* Lift VFS from clang to llvm (NFC)Jonas Devlieghere2018-10-101-0/+2121
This patch moves the virtual file system form clang to llvm so it can be used by more projects. Concretely the patch: - Moves VirtualFileSystem.{h|cpp} from clang/Basic to llvm/Support. - Moves the corresponding unit test from clang to llvm. - Moves the vfs namespace from clang::vfs to llvm::vfs. - Formats the lines affected by this change, mostly this is the result of the added llvm namespace. RFC on the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2018-October/126657.html Differential revision: https://reviews.llvm.org/D52783 llvm-svn: 344140
OpenPOWER on IntegriCloud