diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp index 166d4a25363c..40e8bd2b8776 100644 --- a/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp +++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp @@ -166,8 +166,7 @@ bool DependencyScanningWorkerFilesystem::shouldIgnoreFile( llvm::ErrorOr 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;