Go to file
Richard Smith 040e12662a Support lazy stat'ing of files referenced by module maps.
This patch adds support for a `header` declaration in a module map to specify
certain `stat` information (currently, size and mtime) about that header file.
This has two purposes:

- It removes the need to eagerly `stat` every file referenced by a module map.
  Instead, we track a list of unresolved header files with each size / mtime
  (actually, for simplicity, we track submodules with such headers), and when
  attempting to look up a header file based on a `FileEntry`, we check if there
  are any unresolved header directives with that `FileEntry`'s size / mtime and
  perform deferred `stat`s if so.

- It permits a preprocessed module to be compiled without the original files
  being present on disk. The only reason we used to need those files was to get
  the `stat` information in order to do header -> module lookups when using the
  module. If we're provided with the `stat` information in the preprocessed
  module, we can avoid requiring the files to exist.

Unlike most `header` directives, if a `header` directive with `stat`
information has no corresponding on-disk file the enclosing module is *not*
marked unavailable (so that behavior is consistent regardless of whether we've
resolved a header directive, and so that preprocessed modules don't get marked
unavailable). We could actually do this for all `header` directives: the only
reason we mark the module unavailable if headers are missing is to give a
diagnostic slightly earlier (rather than waiting until we actually try to build
the module / load and validate its .pcm file).

Differential Revision: https://reviews.llvm.org/D33703

llvm-svn: 304515
2017-06-02 01:55:39 +00:00
clang Support lazy stat'ing of files referenced by module maps. 2017-06-02 01:55:39 +00:00
clang-tools-extra [clangd] Mark results of clangd requests with a tag provided by the FileSystemProvider. 2017-05-30 15:11:02 +00:00
compiler-rt [sanitizer-coverage] nuke more stale code 2017-06-02 01:17:04 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx [test] Allow non-libc++ coroutine_handle::done to strengthen noexcept 2017-06-01 22:40:16 +00:00
libcxxabi [libcxxabi] Rework CMakeLists.txt into modules 2017-06-01 00:09:20 +00:00
libunwind [libunwind] Fix executable stack directive on Linux. 2017-05-16 20:18:57 +00:00
lld Run fabricateDefaultCommands before fixSectionAlignments. 2017-06-02 01:37:58 +00:00
lldb [TypeSystem] Handle Clang AttributedTypes 2017-06-02 01:24:18 +00:00
llgo benchcomp: Add a mode for analyzing file sizes. 2017-04-03 19:13:12 +00:00
llvm [RS4GC] Comment clarification 2017-06-02 01:52:06 +00:00
openmp Re-enable assertion after the problem that caused it to be hit had been fixed 2017-06-01 18:10:45 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [CodeGen] Iterate over explicit instruction list for block statements. NFC 2017-06-02 00:13:49 +00:00