| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, we would return true/false signifying if the cache/lookup
succeeded or failed. Instead, provide clients with the underlying error
that was thrown while attempting to look up in the cache.
Since clang::FileManager doesn't make use of this information, it discards the
error that's received and casts away to bool.
This change is NFC.
Reviewers: benlangmuir, arphaman
Subscribers: dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60735
llvm-svn: 358509
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
FileData was only ever used as a container for the values in
llvm::vfs::Status, so they might as well be consolidated.
The `InPCH` member was also always set to false, and unused.
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58924
llvm-svn: 355368
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
removed
Stat cache chaining was implemented for a StatListener in the PTH writer so that
it could write out the stat information to PTH. r348266 removed support for PTH,
and it doesn't seem like there are other uses of stat cache chaining. We can
remove the chaining support.
Differential Revision: https://reviews.llvm.org/D55455
llvm-svn: 349942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}
llvm-svn: 338291
|
|
|
|
|
|
| |
other minor fixes (NFC).
llvm-svn: 328735
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: NFCI
Reviewers: benlangmuir, zturner
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25948
llvm-svn: 286356
|
|
|
|
| |
llvm-svn: 283856
|
|
|
|
|
|
|
| |
This is all going through the VFS layer now, so there's nothing
platform-specific here.
llvm-svn: 239573
|
|
|
|
|
|
|
| |
This eliminates converting back and forth between the 3 formats and
gives us a more homogeneous interface.
llvm-svn: 220657
|
|
|
|
|
|
|
|
|
| |
std::unique_ptr
Spotted after a memory leak (due to the complexities of manual memory
management) was fixed in 212466.
llvm-svn: 212541
|
|
|
|
|
|
| |
Patch by Guochun Shi.
llvm-svn: 212466
|
|
|
|
| |
llvm-svn: 210780
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 208280
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This unifies the unix and windows versions of FileManager::UniqueDirContainer
and FileManager::UniqueFileContainer by using UniqueID.
We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we
want to be able to construct fake ones, and file_status has different members
on unix and windows.
What the patch does is:
* Record only the information that clang is actually using.
* Use llvm::sys::fs::status instead of stat and fstat.
* Use llvm::sys::fs::UniqueID
* Delete the old windows versions of UniqueDirContainer and
UniqueFileContainer since the "unix" one now works on windows too.
llvm-svn: 187619
|
|
|
|
| |
llvm-svn: 186448
|
|
|
|
|
|
|
|
|
|
| |
a file or directory, allowing just a stat call if a file descriptor
is not needed.
Doing just 'stat' is faster than 'open/fstat/close'.
This has the effect of cutting down system time for validating the input files of a PCH.
llvm-svn: 169831
|
|
|
|
|
|
| |
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146959
|
|
|
|
| |
llvm-svn: 122087
|
|
|
|
| |
llvm-svn: 120688
|
|
|
|
| |
llvm-svn: 120297
|
|
|
|
|
|
|
| |
- FileEntry::operator= is needed on Win32.
- There was an error in the S_ISDIR() macro.
llvm-svn: 120079
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
followed by an open for every source file we open, probe the file system with
'open' and then do an fstat when it succeeds. open+fstat is faster than
stat+open because the kernel only has to perform the string->inode mapping
once. Presumably it gets faster the deeper in your filesystem a lookup
happens.
For -Eonly on cocoa.h, this reduces system time from 0.042s to 0.039s on
my machine, a 7.7% speedup.
llvm-svn: 120066
|
|
|
|
|
|
| |
leak a filedescriptor if a client ever starts returning one.
llvm-svn: 120062
|
|
|
|
|
|
|
|
|
| |
pointer that is passed down through the APIs, and make
FileSystemStatCache::get be the one that filters out
directory lookups that hit files. This also paves the
way to have stat queries be able to return opened files.
llvm-svn: 120060
|
|
|
|
| |
llvm-svn: 120039
|
|
|
|
| |
llvm-svn: 120038
|
|
|
|
|
|
|
| |
MemoryBuffer::getFile, causing us to pick up a fstat for
every file. Restore the optimization.
llvm-svn: 120032
|
|
|
|
|
|
| |
the result code of the stat to/from the PCH file since it is always 0.
llvm-svn: 120031
|
|
its own header and giving it some more structure. No
functionality change.
llvm-svn: 120030
|