summaryrefslogtreecommitdiffstats
path: root/test/VFS
Commit message (Collapse)AuthorAgeFilesLines
* Don't diagnose non-modular includes when we are not compiling a module.Manman Ren2016-08-266-0/+59
| | | | | | | | | | | | | | | This is triggered when we are compiling an implementation of a module, it has relative includes to a VFS-mapped module with umbrella headers. Currently we will find the real path to headers under the umbrella directory, but the umbrella directories are using virtual path. rdar://27951255 Thanks Ben and Richard for reviewing the patch! Differential Revision: http://reviews.llvm.org/D23858 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279838 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply [VFS] Skip non existent files from the VFS treeBruno Cardoso Lopes2016-08-126-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reapply r278457 with test fixed to not abouse fs case sensitivity. When the VFS uses a YAML file, the real file path for a virtual file is described in the "external-contents" field. Example: ... { 'type': 'file', 'name': 'a.h', 'external-contents': '/a/b/c/a.h' } Currently, when parsing umbrella directories, we use vfs::recursive_directory_iterator to gather the header files to generate the equivalent modules for. If the external contents for a header does not exist, we currently are unable to build a module, since the VFS vfs::recursive_directory_iterator will fail when it finds an entry without a reliable real path. Since the YAML file could be prepared ahead of time and shared among different compiler invocations, an entry might not yet have a reliable path in 'external-contents', breaking the iteration. Give the VFS the capability to skip such entries whenever 'ignore-non-existent-contents' property is set in the YAML file. rdar://problem/27531549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278543 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[VFS] Skip non existent files from the VFS tree"Bruno Cardoso Lopes2016-08-126-62/+0
| | | | | | | | | Breaking bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/27281/ This reverts commit r278457. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278459 91177308-0d34-0410-b5e6-96231b3b80d8
* [VFS] Skip non existent files from the VFS treeBruno Cardoso Lopes2016-08-126-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the VFS uses a YAML file, the real file path for a virtual file is described in the "external-contents" field. Example: ... { 'type': 'file', 'name': 'a.h', 'external-contents': '/a/b/c/a.h' } Currently, when parsing umbrella directories, we use vfs::recursive_directory_iterator to gather the header files to generate the equivalent modules for. If the external contents for a header does not exist, we currently are unable to build a module, since the VFS vfs::recursive_directory_iterator will fail when it finds an entry without a reliable real path. Since the YAML file could be prepared ahead of time and shared among different compiler invocations, an entry might not yet have a reliable path in 'external-contents', breaking the iteration. Give the VFS the capability to skip such entries whenever 'ignore-non-existent-contents' property is set in the YAML file. rdar://problem/27531549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278457 91177308-0d34-0410-b5e6-96231b3b80d8
* [VFS] Add 'ignore-non-existent-contents' field to YAML filesBruno Cardoso Lopes2016-08-121-0/+1
| | | | | | | | | | | | | | | | | | Add 'ignore-non-existent-contents' to tell the VFS whether an invalid path obtained via 'external-contents' should cause iteration on the VFS to stop. If 'true', the VFS should ignore the entry and continue with the next. Allows YAML files to be shared across multiple compiler invocations regardless of prior existent paths in 'external-contents'. This global value is overridable on a per-file basis. This adds the parsing and write test part, but use by VFS comes next. Differential Revision: https://reviews.llvm.org/D23422 rdar://problem/27531549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278456 91177308-0d34-0410-b5e6-96231b3b80d8
* [VFS] Fix status() of opened redirected fileBen Langmuir2015-12-104-1/+6
| | | | | | | | | | | | | | | Make RedirectedFileSystem::openFilForRead(path)->status() the same as RedirectedFileSystem::status(path). Previously we would just get the status of the underlying real file, which would not have the IsVFSMapped bit set. This fixes rebuilding a module that has an include that is relative to the includer where we will lookup the real path of that file before we lookup the VFS location. rdar://problem/23640339 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255312 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-2/+2
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249655 91177308-0d34-0410-b5e6-96231b3b80d8
* Commit some test changes somehow missed in r239789.Richard Smith2015-06-164-17/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239791 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-2/+2
| | | | | | | | | | LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now that the `DIDescriptor` hierarchy has been gone for about a week. This commit was generated using the rename-md-di-nodes.sh upgrade script attached to PR23080, followed by running clang-format-diff.py on the `lib/` portion of the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236121 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith2015-03-031-2/+2
| | | | | | | Update testcases for LLVM change in r231082 to use the new debug info hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231083 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to rebuild modules on umbrella header mismatchBen Langmuir2015-02-203-1/+6
| | | | | | | | | | | | | | | There are two issues here: 1) It's too late to rebuild at this point, because we won't go through removeModules and when we try to reload the new .pcm we'll get the old one instead. We might be able to call removeModules after an OutOfDate here, but I'm not yet confident that it is always safe to do so. 2) In practice, this check fails spuriously when the umbrella header appears to change because of a VFS change that means it maps to a different copy of the same file. Because of this, we just skip the check for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230064 91177308-0d34-0410-b5e6-96231b3b80d8
* IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith2014-12-151-2/+2
| | | | | | Match LLVM changes from r224257. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224259 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/VFS/umbrella-mismatch.m: Let it work on win32 to avoid ↵NAKAMURA Takumi2014-11-041-2/+1
| | | | | | | | backslashes in yaml. FIXME: Is it intentional? s;OUT_DIR;%/S/Inputs; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221264 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert "DI: LLVM schema change: fold constants into string""Duncan P. N. Exon Smith2014-10-031-1/+1
| | | | | | | | | | | | | | This reverts commit r218917, effectively reapplying r218913. Original commit message follows. -- Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219011 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DI: LLVM schema change: fold constants into string"Duncan P. N. Exon Smith2014-10-021-1/+1
| | | | | | This reverts commit r218913 while I investigate some bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218917 91177308-0d34-0410-b5e6-96231b3b80d8
* DI: LLVM schema change: fold constants into stringDuncan P. N. Exon Smith2014-10-021-1/+1
| | | | | | | | | Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218913 91177308-0d34-0410-b5e6-96231b3b80d8
* Make -Wincomplete-umbrella go through the VFSBen Langmuir2014-06-255-0/+36
| | | | | | | By using vfs::recursive_directory_iterator, this warning will now fire when some or all of a module's headers are from VFS mappings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211746 91177308-0d34-0410-b5e6-96231b3b80d8
* Stopgap fix for finding module for a file mapped in the VFSBen Langmuir2014-05-237-2/+101
| | | | | | | | | | | | | | | | If we lookup a path using its 'real' path first, we need to ensure that when we run header search we still use the VFS-mapped path or we will not be able to find the corresponding module for the header. The real problem is that we tie the name of a file to its underlying FileEntry, which is uniqued by inode, so we only ever get the first name it is looked up by. This doesn't work with modules, which rely on a specific file system structure. I'm hoping to have time to write up a proposal for fixing this more permanently soon, but as a stopgap this patch updates the name of the file's directory if it comes from a VFS mapping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209534 91177308-0d34-0410-b5e6-96231b3b80d8
* When module umbrellas change, rebuild themBen Langmuir2014-04-105-0/+14
| | | | | | | With the VFS, it is easy to hit modified umbrellas by overriding the umbrella header, and what we want is to rebuild, not to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205975 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test where the module map is overriden in the vfsBen Langmuir2014-04-043-0/+34
| | | | | | | Specifically, we pass two -ivfsoverlay yaml files, and the topmost one remaps the module map file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205632 91177308-0d34-0410-b5e6-96231b3b80d8
* Support relative paths in VFSFromYAMLBen Langmuir2014-03-041-0/+11
| | | | | | | | | Use llvm::sys::fs::make_absolute to get an absolute path before matching. Also, allow "." directories to enable testing. ".." is still not supported, and will require crossing file system boundaries to implement correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202903 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply fixed "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-284-0/+47
| | | | | | | | | | | | | | | | Was r202442 There were two issues with the original patch that have now been fixed. 1. We were memset'ing over a FileEntry in a test case. After adding a std::string to FileEntry, this still happened to not break for me. 2. I didn't pass the FileManager into the new compiler instance in compileModule. This was hidden in some cases by the fact I didn't clear the module cache in the test. Also, I changed the copy constructor for FileEntry, which was memcpy'ing in a (now) unsafe way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202539 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-273-46/+0
| | | | | | Revert r202442, which broke the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202443 91177308-0d34-0410-b5e6-96231b3b80d8
* Honour 'use-external-names' in FileManagerBen Langmuir2014-02-273-0/+46
| | | | | | | | Pass through the externally-visible names that we got from the VFS down to FileManager, and test that this is the name showing up in __FILE__, diagnostics, and debug information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202442 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a driver option -ivfsoverlayBen Langmuir2014-02-2517-0/+132
Reads the description of a virtual filesystem from a file and overlays it over the real file system. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202176 91177308-0d34-0410-b5e6-96231b3b80d8