[all-commits] [llvm/llvm-project] 33af4b: [clang][deps] Stop sharing FileManager across modu...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Mon Aug 8 12:30:37 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 33af4b22f8ea5dc8340002833802be95ae9f83a1
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2022-08-08 (Mon, 08 Aug 2022)

  Changed paths:
    M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
    A clang/test/ClangScanDeps/modules-file-path-isolation.c

  Log Message:
  [clang][deps] Stop sharing FileManager across module builds in scanner

Sharing the FileManager across implicit module builds currently leaks
paths looked up in an importer into the built module itself. This can
cause non-deterministic results across scans. It is especially bad for
modules since the path can be saved into the pcm file itself, leading to
stateful behaviour if the cache is shared.

This should not impact the number of real filesystem accesses in the
scanner, since it is already caching in the

Note: this change does not affect whether or not the FileManager is
shared across TUs in the scanner, which is a separate issue.

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

More information about the All-commits mailing list