[VFS] Put the incoming name in the file status to make InMemoryFS behave more like a real FS.

llvm-svn: 249409
This commit is contained in:
Benjamin Kramer
2015-10-06 14:45:16 +00:00
parent cac8fc2329
commit 1b8dbe3738
2 changed files with 14 additions and 1 deletions

View File

@@ -501,7 +501,7 @@ void InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime,
if (I == E) {
// End of the path, create a new file.
// FIXME: expose the status details in the interface.
Status Stat(Path, getNextVirtualUniqueID(),
Status Stat(P.str(), getNextVirtualUniqueID(),
llvm::sys::TimeValue(ModificationTime, 0), 0, 0,
Buffer->getBufferSize(),
llvm::sys::fs::file_type::regular_file,