diff options
author | Ben Langmuir <blangmuir@apple.com> | 2015-12-10 23:41:39 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2015-12-10 23:41:39 +0000 |
commit | f13302e63ff0c858ecac7cc30ea2201c523a43ba (patch) | |
tree | 368c35038f8ff52ee23b47dbcfc79dcae74cc226 /clang/test/VFS | |
parent | 83760378617dfa9670ce9439e9bfdcf2a5c81b90 (diff) | |
download | bcm5719-llvm-f13302e63ff0c858ecac7cc30ea2201c523a43ba.tar.gz bcm5719-llvm-f13302e63ff0c858ecac7cc30ea2201c523a43ba.zip |
[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
Diffstat (limited to 'clang/test/VFS')
-rw-r--r-- | clang/test/VFS/Inputs/public_header.h | 1 | ||||
-rw-r--r-- | clang/test/VFS/Inputs/public_header3.h | 1 | ||||
-rw-r--r-- | clang/test/VFS/Inputs/vfsoverlay.yaml | 4 | ||||
-rw-r--r-- | clang/test/VFS/real-path-found-first.m | 1 |
4 files changed, 6 insertions, 1 deletions
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 <SomeFramework/public_header2.h> +#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 <SomeFramework/public_header.h> // expected-warning{{treating}} #import <SomeFramework/public_header2.h> // expected-warning{{treating}} +#import <SomeFramework/public_header3.h> // expected-warning{{treating}} @import SomeFramework.public_header2; #endif |