From f13302e63ff0c858ecac7cc30ea2201c523a43ba Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Thu, 10 Dec 2015 23:41:39 +0000 Subject: [VFS] Fix status() of opened redirected file Make RedirectedFileSystem::openFilForRead(path)->status() the same as RedirectedFileSystem::status(path). Previously we would just get the status of the underlying real file, which would not have the IsVFSMapped bit set. This fixes rebuilding a module that has an include that is relative to the includer where we will lookup the real path of that file before we lookup the VFS location. rdar://problem/23640339 llvm-svn: 255312 --- clang/test/VFS/Inputs/public_header.h | 1 + clang/test/VFS/Inputs/public_header3.h | 1 + clang/test/VFS/Inputs/vfsoverlay.yaml | 4 +++- clang/test/VFS/real-path-found-first.m | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 clang/test/VFS/Inputs/public_header3.h (limited to 'clang/test') diff --git a/clang/test/VFS/Inputs/public_header.h b/clang/test/VFS/Inputs/public_header.h index 09d9969d319..cc7bcb57eea 100644 --- a/clang/test/VFS/Inputs/public_header.h +++ b/clang/test/VFS/Inputs/public_header.h @@ -1,2 +1,3 @@ #import +#import "public_header3.h" // includer-relative void from_framework(void); diff --git a/clang/test/VFS/Inputs/public_header3.h b/clang/test/VFS/Inputs/public_header3.h new file mode 100644 index 00000000000..ac9deac6ab3 --- /dev/null +++ b/clang/test/VFS/Inputs/public_header3.h @@ -0,0 +1 @@ +// public_header3.h diff --git a/clang/test/VFS/Inputs/vfsoverlay.yaml b/clang/test/VFS/Inputs/vfsoverlay.yaml index f395d45ee3b..504a1530d3c 100644 --- a/clang/test/VFS/Inputs/vfsoverlay.yaml +++ b/clang/test/VFS/Inputs/vfsoverlay.yaml @@ -22,7 +22,9 @@ { 'name': 'public_header.h', 'type': 'file', 'external-contents': 'INPUT_DIR/public_header.h' }, { 'name': 'public_header2.h', 'type': 'file', - 'external-contents': 'INPUT_DIR/public_header2.h' } + 'external-contents': 'INPUT_DIR/public_header2.h' }, + { 'name': 'public_header3.h', 'type': 'file', + 'external-contents': 'INPUT_DIR/public_header3.h' } ] } ] diff --git a/clang/test/VFS/real-path-found-first.m b/clang/test/VFS/real-path-found-first.m index 3b37a644bcb..5838aa36c45 100644 --- a/clang/test/VFS/real-path-found-first.m +++ b/clang/test/VFS/real-path-found-first.m @@ -70,5 +70,6 @@ #ifndef WITH_PREFIX #import // expected-warning{{treating}} #import // expected-warning{{treating}} +#import // expected-warning{{treating}} @import SomeFramework.public_header2; #endif -- cgit v1.2.3