[all-commits] [llvm/llvm-project] 9ab6d8: [clang-scan-deps] Add basic support for modules.

Michael Spencer via All-commits all-commits at lists.llvm.org
Thu Oct 24 16:21:06 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ab6d8236b176bf9dd43741f4d874a8afebed99c
      https://github.com/llvm/llvm-project/commit/9ab6d8236b176bf9dd43741f4d874a8afebed99c
  Author: Michael Spencer <bigcheesegs at gmail.com>
  Date:   2019-10-24 (Thu, 24 Oct 2019)

  Changed paths:
    M clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
    A clang/test/ClangScanDeps/Inputs/module.modulemap
    A clang/test/ClangScanDeps/Inputs/modules_cdb.json
    A clang/test/ClangScanDeps/modules.cpp

  Log Message:
  -----------
  [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 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.

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




More information about the All-commits mailing list