summaryrefslogtreecommitdiffstats
path: root/clang/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
commit5de00f3b56805c7e980f049ceb3f166f8c69cec0 (patch)
tree1ae1c0ee9e452f85526ef0334ecd4b115b315c0b /clang/lib/Basic/FileSystemStatCache.cpp
parent8651081bbe4b8e798a06b4e5b429098b58a1435d (diff)
downloadbcm5719-llvm-5de00f3b56805c7e980f049ceb3f166f8c69cec0.tar.gz
bcm5719-llvm-5de00f3b56805c7e980f049ceb3f166f8c69cec0.zip
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. llvm-svn: 209534
Diffstat (limited to 'clang/lib/Basic/FileSystemStatCache.cpp')
-rw-r--r--clang/lib/Basic/FileSystemStatCache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp
index 44ba48aa2fc..0f16e94a05e 100644
--- a/clang/lib/Basic/FileSystemStatCache.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud