[PATCH] D68835: [clang-scan-deps] Add basic support for Clang modules.

Michael Spencer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 14:43:19 PDT 2019


Bigcheese created this revision.
Bigcheese added a reviewer: arphaman.
Herald added subscribers: tschuett, dexonsmith.
Herald added a project: clang.

This fixes two issues that prevent simple uses of Clang modules from working.

- We would previously minimize _every_ file opened by clang, even module maps and module pcm files. Now we only minimize files with known extensions. It would be better if we knew which files clang intended to open as a source file, but this works for now.

- We previously cached every lookup, even failed lookups. This is a problem because clang stats the module cache directory before building a module and creating that directory. If we cache that failure then the subsequent pcm 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.


Repository:
  rC Clang

https://reviews.llvm.org/D68835

Files:
  lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
  test/ClangScanDeps/Inputs/module.modulemap
  test/ClangScanDeps/Inputs/modules_cdb.json
  test/ClangScanDeps/modules.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68835.224484.patch
Type: text/x-patch
Size: 5740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191010/a4d878a8/attachment-0001.bin>


More information about the cfe-commits mailing list