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 | 9440ecd124b8d0ea964789392e651e9f692bd44e (patch) | |
tree | d93e6241012bcf338d5f65c8871c212b675552fb /test/VFS | |
parent | ac200add36b40904bae8bbe7070e60c7f60b7c35 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/VFS')
-rw-r--r-- | test/VFS/Inputs/public_header.h | 1 | ||||
-rw-r--r-- | test/VFS/Inputs/public_header3.h | 1 | ||||
-rw-r--r-- | test/VFS/Inputs/vfsoverlay.yaml | 4 | ||||
-rw-r--r-- | test/VFS/real-path-found-first.m | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/test/VFS/Inputs/public_header.h b/test/VFS/Inputs/public_header.h index 09d9969d31..cc7bcb57ee 100644 --- a/test/VFS/Inputs/public_header.h +++ b/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/test/VFS/Inputs/public_header3.h b/test/VFS/Inputs/public_header3.h new file mode 100644 index 0000000000..ac9deac6ab --- /dev/null +++ b/test/VFS/Inputs/public_header3.h @@ -0,0 +1 @@ +// public_header3.h diff --git a/test/VFS/Inputs/vfsoverlay.yaml b/test/VFS/Inputs/vfsoverlay.yaml index f395d45ee3..504a1530d3 100644 --- a/test/VFS/Inputs/vfsoverlay.yaml +++ b/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/test/VFS/real-path-found-first.m b/test/VFS/real-path-found-first.m index 3b37a644bc..5838aa36c4 100644 --- a/test/VFS/real-path-found-first.m +++ b/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 |