| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
This eliminates converting back and forth between the 3 formats and
gives us a more homogeneous interface.
llvm-svn: 220657
|
|
|
|
| |
llvm-svn: 216576
|
|
|
|
| |
llvm-svn: 215856
|
|
|
|
| |
llvm-svn: 215853
|
|
|
|
|
|
|
| |
In r209332 I accidentally broke generation of empty VFS maps. This
fixes the issue and adds a test.
llvm-svn: 213028
|
|
|
|
| |
llvm-svn: 212408
|
|
|
|
|
|
|
|
|
| |
For now, this is only used by its unit tests. It is similar to the API
in llvm::sys::fs::recursive_directory_iterator, but without some of the
more complex features like requesting that the iterator not recurse into
the next directory, for example.
llvm-svn: 211732
|
|
|
|
|
|
|
|
| |
The API is based on sys::fs::directory_iterator, but it allows iterating
over overlays and the yaml-based VFS. For now, it isn't used by
anything (except its tests).
llvm-svn: 211623
|
|
|
|
| |
llvm-svn: 210921
|
|
|
|
| |
llvm-svn: 210817
|
|
|
|
|
|
| |
This is in preparation for removing make_error_code from the llvm namespace.
llvm-svn: 210745
|
|
|
|
| |
llvm-svn: 210736
|
|
|
|
|
|
| |
Sorry, no testcase, just noticed while trying to remove llvm's system_error.h
llvm-svn: 210727
|
|
|
|
|
|
| |
This is an update for a llvm api change.
llvm-svn: 210688
|
|
|
|
| |
llvm-svn: 209956
|
|
|
|
|
|
|
| |
There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.
llvm-svn: 209949
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 209534
|
|
|
|
|
|
|
|
|
|
|
| |
There are a couple of issues with writing VFS maps that are awkward to
fix within the current mutually recursive approach. Instead, replace
the algorithm with an iterative version that uses an explicit stack of
directories.
Includes tests for cases the old approach was tripping on.
llvm-svn: 209332
|
|
|
|
|
|
|
|
| |
Checking if a path starts with another path isn't sufficient for
determining if one is contained within the heirarchy of the other.
We need to ensure that the substring ends at a directory boundary.
llvm-svn: 209250
|
|
|
|
|
|
|
|
|
| |
This moves the logic to write a JSON VFS mapping from the C api into
VirtualFileSystem, so that we can use it internally.
No functional change.
llvm-svn: 209241
|
|
|
|
| |
llvm-svn: 208280
|
|
|
|
|
|
|
|
| |
opening functions.
Needs llvm r208007.
llvm-svn: 208008
|
|
|
|
|
|
| |
semantics where appropriate.
llvm-svn: 203477
|
|
|
|
| |
llvm-svn: 203389
|
|
|
|
|
|
| |
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
|
|
|
|
|
|
| |
This is a precursor to moving to std::unique_ptr.
llvm-svn: 203275
|
|
|
|
|
|
|
| |
Using a //net/ path to hopefully avoid problems with non-absolute paths
on Windows.
llvm-svn: 203010
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 202903
|
|
|
|
|
|
| |
No intended functionality change.
llvm-svn: 202652
|
|
|
|
| |
llvm-svn: 202625
|
|
|
|
| |
llvm-svn: 202611
|
|
|
|
| |
llvm-svn: 202595
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 202539
|
|
|
|
|
|
| |
Revert r202442, which broke the buildbots.
llvm-svn: 202443
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 202442
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When true, sets the name of the file to be the name from
'external-contents'. Otherwise, you get the virtual path that the file
was looked up by. This will not affect any non-virtual paths, or fully
virtual paths (for which there is no reasonable 'external' name anyway).
The setting is available globally, but can be overriden on a per-file
basis.
The goal is that this setting will control which path you see in debug
info, diagnostics, etc. which are sensitive to which path is used. That
will come in future patches that pass the name through to FileManager.
llvm-svn: 202329
|
|
|
|
|
|
|
| |
Reads the description of a virtual filesystem from a file and overlays
it over the real file system.
llvm-svn: 202176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the 'name' field to contain a path, like
{ 'type': 'directory',
'name': '/path/to/dir',
'contents': [ ... ] }
which not only simplifies reading and writing these files (for humans),
but makes it possible to easily modify locations via textual
replacement, which would not have worked in the old scheme.
E.g. sed s:<ROOT>:<NEW ROOT>
llvm-svn: 202109
|
|
|
|
|
|
|
| |
This allows the unit tests to not use global state when checking
diagnostics.
llvm-svn: 202072
|
|
|
|
|
|
|
| |
Avoid a warning about reaching the end of a non-void function after a
covered switch.
llvm-svn: 201919
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provides a way to create a virtual file system using a YAML file that
supports mapping a file to a path on an 'external' file system. The
external file system will typically be the 'real' file system, but for
testing it can be changed.
A future patch will add a clang option to allow the user to specify such
a file and overlay it, but for now this code is only exercised by the
unit tests.
Differential Revision: http://llvm-reviews.chandlerc.com/D2835
llvm-svn: 201905
|
|
|
|
|
|
|
|
|
|
|
| |
Previously reverted in r201755 due to causing an assertion failure.
I've removed the offending assertion, and taught the CompilerInstance to
create a default virtual file system inside createFileManager. In the
future, we should be able to reach into the CompilerInvocation to
customize this behaviour without breaking clients that don't care.
llvm-svn: 201818
|
|
|
|
|
|
|
|
|
|
| |
assertion
in our internal build bots.
This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696.
llvm-svn: 201755
|
|
|
|
|
|
| |
No functional change
llvm-svn: 201696
|
|
|
|
|
|
| |
Fixes PR18895
llvm-svn: 201685
|
|
|
|
|
|
|
| |
Provides a way to merge multiple vfs::FileSystem objects into a single
filesystem.
llvm-svn: 201635
|
|
This adds the minimum virtual file system support to start migrating
FileManager onto the VFS.
Originally discussed here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035188.html
Differential Revision: http://llvm-reviews.chandlerc.com/D2745
llvm-svn: 201618
|