[all-commits] [llvm/llvm-project] 03a0f4: [clang/HeaderSearch] Make sure `loadSubdirectoryMo...

Argyrios Kyrtzidis via All-commits all-commits at lists.llvm.org
Mon Jun 26 10:19:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03a0f4b61ca50a267a405a29ff1986473a55f9d9
      https://github.com/llvm/llvm-project/commit/03a0f4b61ca50a267a405a29ff1986473a55f9d9
  Author: Argyrios Kyrtzidis <kyrtzidis at apple.com>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M clang/lib/Lex/HeaderSearch.cpp
    M clang/unittests/Tooling/DependencyScannerTest.cpp

  Log Message:
  -----------
  [clang/HeaderSearch] Make sure `loadSubdirectoryModuleMaps` doesn't cause loading of regular files

`HeaderSearch::loadSubdirectoryModuleMaps` `stat`s all the files in a directory which causes the dependency scanning
service to load and cache their contents. This is problematic because a file may be in the process of being generated
and could be cached by the dep-scan service while it is still incomplete.

To address this change `loadSubdirectoryModuleMaps` to ignore regular files.

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




More information about the All-commits mailing list