From ee89b2e01dfb29ceb58748f9a8ad173430a01d18 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Wed, 24 Oct 2018 22:39:38 +0000 Subject: [PATCH] [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS. 'ignore-non-existent-contents' stopped working after r342232 in a way that the actual attribute value isn't used and it works as if it is always `true`. Common use case for VFS iteration is iterating through files in umbrella directories for modules. Ability to detect if some VFS entries point to non-existing files is nice but non-critical. Instead of adding back support for `'ignore-non-existent-contents': false` I am removing the attribute, because such scenario isn't used widely enough and stricter checks don't provide enough value to justify the maintenance. rdar://problem/45176119 Reviewers: bruno Reviewed By: bruno Subscribers: hiraditya, dexonsmith, sammccall, cfe-commits Differential Revision: https://reviews.llvm.org/D53228 llvm-svn: 345212 --- clang/lib/Frontend/ModuleDependencyCollector.cpp | 4 ---- clang/test/Modules/crash-vfs-headermaps.m | 1 - clang/test/Modules/crash-vfs-include-pch.m | 1 - clang/test/Modules/crash-vfs-ivfsoverlay.m | 1 - clang/test/Modules/crash-vfs-relative-incdir.m | 1 - clang/test/Modules/crash-vfs-run-reproducer.m | 1 - clang/test/VFS/Inputs/MissingVFS/vfsoverlay.yaml | 1 - clang/test/VFS/Inputs/Nonmodular/nonmodular-headers.yaml | 1 - clang/test/VFS/Inputs/bar-headers.yaml | 1 - clang/test/VFS/Inputs/vfsoverlay2.yaml | 1 - 10 files changed, 13 deletions(-) diff --git a/clang/lib/Frontend/ModuleDependencyCollector.cpp b/clang/lib/Frontend/ModuleDependencyCollector.cpp index 25cad8b..fa8efcc 100644 --- a/clang/lib/Frontend/ModuleDependencyCollector.cpp +++ b/clang/lib/Frontend/ModuleDependencyCollector.cpp @@ -156,10 +156,6 @@ void ModuleDependencyCollector::writeFileMap() { // allows crash reproducer scripts to work across machines. VFSWriter.setOverlayDir(VFSDir); - // Do not ignore non existent contents otherwise we might skip something - // that should have been collected here. - VFSWriter.setIgnoreNonExistentContents(false); - // Explicitly set case sensitivity for the YAML writer. For that, find out // the sensitivity at the path where the headers all collected to. VFSWriter.setCaseSensitivity(isCaseSensitivePath(VFSDir)); diff --git a/clang/test/Modules/crash-vfs-headermaps.m b/clang/test/Modules/crash-vfs-headermaps.m index 118537b..f4c101c 100644 --- a/clang/test/Modules/crash-vfs-headermaps.m +++ b/clang/test/Modules/crash-vfs-headermaps.m @@ -32,7 +32,6 @@ // CHECKYAML: 'case-sensitive': // CHECKYAML-NEXT: 'use-external-names': 'false', // CHECKYAML-NEXT: 'overlay-relative': 'true', -// CHECKYAML-NEXT: 'ignore-non-existent-contents': 'false' // CHECKYAML: 'type': 'directory' // CHECKYAML: 'name': "/[[PATH:.*]]/Foo.framework/Headers", // CHECKYAML-NEXT: 'contents': [ diff --git a/clang/test/Modules/crash-vfs-include-pch.m b/clang/test/Modules/crash-vfs-include-pch.m index 78a8e14..f4ae00e 100644 --- a/clang/test/Modules/crash-vfs-include-pch.m +++ b/clang/test/Modules/crash-vfs-include-pch.m @@ -33,7 +33,6 @@ void g() { double x = DBL_MAX; } // CHECKYAML: 'case-sensitive': // CHECKYAML-NEXT: 'use-external-names': 'false', // CHECKYAML-NEXT: 'overlay-relative': 'true', -// CHECKYAML-NEXT: 'ignore-non-existent-contents': 'false' // CHECKYAML: 'type': 'directory' // CHECKYAML: 'name': "/[[PATH:.*]]/out", // CHECKYAML-NEXT: 'contents': [ diff --git a/clang/test/Modules/crash-vfs-ivfsoverlay.m b/clang/test/Modules/crash-vfs-ivfsoverlay.m index 85aaeae..3cb0f1d 100644 --- a/clang/test/Modules/crash-vfs-ivfsoverlay.m +++ b/clang/test/Modules/crash-vfs-ivfsoverlay.m @@ -36,7 +36,6 @@ // CHECKYAML: 'case-sensitive': // CHECKYAML-NEXT: 'use-external-names': 'false', // CHECKYAML-NEXT: 'overlay-relative': 'true', -// CHECKYAML-NEXT: 'ignore-non-existent-contents': 'false' // CHECKYAML: 'type': 'directory' // CHECKYAML: 'name': "/[[PATH:.*]]/example" // CHECKYAML: 'contents': [ diff --git a/clang/test/Modules/crash-vfs-relative-incdir.m b/clang/test/Modules/crash-vfs-relative-incdir.m index ed02de8..d019c01 100644 --- a/clang/test/Modules/crash-vfs-relative-incdir.m +++ b/clang/test/Modules/crash-vfs-relative-incdir.m @@ -36,7 +36,6 @@ // CHECKYAML: 'case-sensitive': // CHECKYAML-NEXT: 'use-external-names': 'false', // CHECKYAML-NEXT: 'overlay-relative': 'true', -// CHECKYAML-NEXT: 'ignore-non-existent-contents': 'false' // CHECKYAML: 'type': 'directory' // CHECKYAML: 'name': "/[[PATH:.*]]/Inputs/crash-recovery/usr/include", // CHECKYAML-NEXT: 'contents': [ diff --git a/clang/test/Modules/crash-vfs-run-reproducer.m b/clang/test/Modules/crash-vfs-run-reproducer.m index eba56c5..d15b52d 100644 --- a/clang/test/Modules/crash-vfs-run-reproducer.m +++ b/clang/test/Modules/crash-vfs-run-reproducer.m @@ -36,7 +36,6 @@ // CHECKYAML: 'case-sensitive': // CHECKYAML-NEXT: 'use-external-names': 'false', // CHECKYAML-NEXT: 'overlay-relative': 'true', -// CHECKYAML-NEXT: 'ignore-non-existent-contents': 'false' // CHECKYAML: 'type': 'directory' // CHECKYAML: 'name': "/[[PATH:.*]]/Inputs/crash-recovery/usr/include", // CHECKYAML-NEXT: 'contents': [ diff --git a/clang/test/VFS/Inputs/MissingVFS/vfsoverlay.yaml b/clang/test/VFS/Inputs/MissingVFS/vfsoverlay.yaml index 49517a1..cb74879 100644 --- a/clang/test/VFS/Inputs/MissingVFS/vfsoverlay.yaml +++ b/clang/test/VFS/Inputs/MissingVFS/vfsoverlay.yaml @@ -1,6 +1,5 @@ { 'version': 0, - 'ignore-non-existent-contents': false, 'roots': [ { 'name': 'INPUT_DIR', 'type': 'directory', 'contents': [ diff --git a/clang/test/VFS/Inputs/Nonmodular/nonmodular-headers.yaml b/clang/test/VFS/Inputs/Nonmodular/nonmodular-headers.yaml index a041728..7ccddd2d 100644 --- a/clang/test/VFS/Inputs/Nonmodular/nonmodular-headers.yaml +++ b/clang/test/VFS/Inputs/Nonmodular/nonmodular-headers.yaml @@ -1,7 +1,6 @@ { 'version': 0, 'case-sensitive': 'false', - 'ignore-non-existent-contents': 'true', 'roots': [ { 'type': 'directory', diff --git a/clang/test/VFS/Inputs/bar-headers.yaml b/clang/test/VFS/Inputs/bar-headers.yaml index 846d55c..710e6cb 100644 --- a/clang/test/VFS/Inputs/bar-headers.yaml +++ b/clang/test/VFS/Inputs/bar-headers.yaml @@ -1,7 +1,6 @@ { 'version': 0, 'case-sensitive': 'false', - 'ignore-non-existent-contents': 'true', 'roots': [ { 'type': 'directory', diff --git a/clang/test/VFS/Inputs/vfsoverlay2.yaml b/clang/test/VFS/Inputs/vfsoverlay2.yaml index 688ae64..ae2a0ce 100644 --- a/clang/test/VFS/Inputs/vfsoverlay2.yaml +++ b/clang/test/VFS/Inputs/vfsoverlay2.yaml @@ -1,6 +1,5 @@ { 'version': 0, - 'ignore-non-existent-contents': false, 'roots': [ { 'name': 'OUT_DIR', 'type': 'directory', 'contents': [ -- 2.7.4