Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit eb66e2f

Browse files
committed
Revert "[VFS] Skip non existent files from the VFS tree"
Breaking bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/27281/ This reverts commit r278457. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278459 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent d28be6c commit eb66e2f

File tree

7 files changed

+8
-88
lines changed

7 files changed

+8
-88
lines changed

Diff for: lib/Basic/VirtualFileSystem.cpp

+8-26
Original file line numberDiff line numberDiff line change
@@ -1778,47 +1778,29 @@ VFSFromYamlDirIterImpl::VFSFromYamlDirIterImpl(
17781778
RedirectingDirectoryEntry::iterator Begin,
17791779
RedirectingDirectoryEntry::iterator End, std::error_code &EC)
17801780
: Dir(_Path.str()), FS(FS), Current(Begin), End(End) {
1781-
while (Current != End) {
1781+
if (Current != End) {
17821782
SmallString<128> PathStr(Dir);
17831783
llvm::sys::path::append(PathStr, (*Current)->getName());
17841784
llvm::ErrorOr<vfs::Status> S = FS.status(PathStr);
1785-
if (S) {
1785+
if (S)
17861786
CurrentEntry = *S;
1787-
return;
1788-
}
1789-
// Skip entries which do not map to a reliable external content.
1790-
if (FS.ignoreNonExistentContents() &&
1791-
S.getError() == llvm::errc::no_such_file_or_directory) {
1792-
++Current;
1793-
continue;
1794-
} else {
1787+
else
17951788
EC = S.getError();
1796-
break;
1797-
}
17981789
}
17991790
}
18001791

18011792
std::error_code VFSFromYamlDirIterImpl::increment() {
18021793
assert(Current != End && "cannot iterate past end");
1803-
while (++Current != End) {
1794+
if (++Current != End) {
18041795
SmallString<128> PathStr(Dir);
18051796
llvm::sys::path::append(PathStr, (*Current)->getName());
18061797
llvm::ErrorOr<vfs::Status> S = FS.status(PathStr);
1807-
if (!S) {
1808-
// Skip entries which do not map to a reliable external content.
1809-
if (FS.ignoreNonExistentContents() &&
1810-
S.getError() == llvm::errc::no_such_file_or_directory) {
1811-
continue;
1812-
} else {
1813-
return S.getError();
1814-
}
1815-
}
1798+
if (!S)
1799+
return S.getError();
18161800
CurrentEntry = *S;
1817-
break;
1818-
}
1819-
1820-
if (Current == End)
1801+
} else {
18211802
CurrentEntry = Status();
1803+
}
18221804
return std::error_code();
18231805
}
18241806

Diff for: test/VFS/Inputs/Bar.framework/Headers/A.h

-1
This file was deleted.

Diff for: test/VFS/Inputs/Bar.framework/Headers/B.h

-1
This file was deleted.

Diff for: test/VFS/Inputs/Bar.framework/Headers/C.h

-1
This file was deleted.

Diff for: test/VFS/Inputs/Bar.framework/Modules/module.modulemap

-6
This file was deleted.

Diff for: test/VFS/Inputs/bar-headers.yaml

-39
This file was deleted.

Diff for: test/VFS/umbrella-framework-import-skipnonexist.m

-14
This file was deleted.

0 commit comments

Comments
 (0)