summaryrefslogtreecommitdiffstats
path: root/lib/Basic/FileSystemStatCache.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-05-23 18:15:47 +0000
committerBen Langmuir <blangmuir@apple.com>2014-05-23 18:15:47 +0000
commit68d890da0854b4257c2fc2ab461cd6bfacf05c82 (patch)
tree2702f6f054f8e91180832ce9a82338f0b598ad95 /lib/Basic/FileSystemStatCache.cpp
parent4c92d444ffb0c65cfc85e60edca08d32fb10fdae (diff)
Stopgap fix for finding module for a file mapped in the VFS
If we lookup a path using its 'real' path first, we need to ensure that when we run header search we still use the VFS-mapped path or we will not be able to find the corresponding module for the header. The real problem is that we tie the name of a file to its underlying FileEntry, which is uniqued by inode, so we only ever get the first name it is looked up by. This doesn't work with modules, which rely on a specific file system structure. I'm hoping to have time to write up a proposal for fixing this more permanently soon, but as a stopgap this patch updates the name of the file's directory if it comes from a VFS mapping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/FileSystemStatCache.cpp')
-rw-r--r--lib/Basic/FileSystemStatCache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Basic/FileSystemStatCache.cpp b/lib/Basic/FileSystemStatCache.cpp
index 44ba48aa2f..0f16e94a05 100644
--- a/lib/Basic/FileSystemStatCache.cpp
+++ b/lib/Basic/FileSystemStatCache.cpp
@@ -39,6 +39,7 @@ static void copyStatusToFileData(const vfs::Status &Status,
Data.IsDirectory = Status.isDirectory();
Data.IsNamedPipe = Status.getType() == llvm::sys::fs::file_type::fifo_file;
Data.InPCH = false;
+ Data.IsVFSMapped = Status.IsVFSMapped;
}
/// FileSystemStatCache::get - Get the 'stat' information for the specified