[clang][deps] Fix test by checking ignored files correctly
authorJan Svoboda <jan_svoboda@apple.com>
Tue, 20 Jul 2021 11:17:45 +0000 (13:17 +0200)
committerJan Svoboda <jan_svoboda@apple.com>
Tue, 20 Jul 2021 11:20:56 +0000 (13:20 +0200)
After a rebase, bc1a2979fc70d954ae97122205c71c8404a1b17e accidentally changed `shouldIgnoreFile(Filename)` to incorrect `IgnoredFiles.count(Filename)`. This avoided using native filenames, which the patch intended to solve in the first place.

Failing Windows builds:
* https://lab.llvm.org/buildbot#builders/123/builds/5147
* https://lab.llvm.org/buildbot#builders/86/builds/17177

clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp

index 166d4a2..40e8bd2 100644 (file)
@@ -166,8 +166,7 @@ bool DependencyScanningWorkerFilesystem::shouldIgnoreFile(
 llvm::ErrorOr<const CachedFileSystemEntry *>
 DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry(
     const StringRef Filename) {
-  bool ShouldMinimize =
-      !IgnoredFiles.count(Filename) && shouldMinimize(Filename);
+  bool ShouldMinimize = !shouldIgnoreFile(Filename) && shouldMinimize(Filename);
 
   if (const auto *Entry = Cache.getCachedEntry(Filename, ShouldMinimize))
     return Entry;