1. [clang-scan-deps] Add basic support for modules. (details)
Commit 9ab6d8236b176bf9dd43741f4d874a8afebed99c by michael_spencer
[clang-scan-deps] Add basic support for modules.
This fixes two issues that prevent simple uses of modules from working.
* We would previously minimize _every_ file opened by clang, even module
and module pcm files. Now we only minimize files with known extensions.
would be better if we knew which files clang intended to open as a
file, but this works for now.
* We previously cached every lookup, even failed lookups. This is a
because clang stats the module cache directory before building a module
creating that directory. If we cache that failure then the subsequent
load doesn't see the module cache and fails.
Overall this still leaves us building minmized modules on disk during
scanning. This will need to be improved eventually for performance, but
this is correct, and works for now.
Differential Revision:
The file was addedclang/test/ClangScanDeps/Inputs/module.modulemap
The file was addedclang/test/ClangScanDeps/Inputs/modules_cdb.json
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
The file was addedclang/test/ClangScanDeps/modules.cpp