Skip to content
Snippets Groups Projects
Commit 41a697b8 authored by Benjamin Kramer's avatar Benjamin Kramer
Browse files

[VFS] Fix compilation on systems where time_t is not int64_t.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249318 91177308-0d34-0410-b5e6-96231b3b80d8
parent 5b1864da
No related branches found
No related tags found
No related merge requests found
...@@ -495,7 +495,7 @@ void InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime, ...@@ -495,7 +495,7 @@ void InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime,
// End of the path, create a new file. // End of the path, create a new file.
// FIXME: expose the status details in the interface. // FIXME: expose the status details in the interface.
Status Stat(Path, getNextVirtualUniqueID(), Status Stat(Path, getNextVirtualUniqueID(),
llvm::sys::TimeValue(ModificationTime), 0, 0, llvm::sys::TimeValue(ModificationTime, 0), 0, 0,
Buffer->getBufferSize(), Buffer->getBufferSize(),
llvm::sys::fs::file_type::regular_file, llvm::sys::fs::file_type::regular_file,
llvm::sys::fs::all_all); llvm::sys::fs::all_all);
...@@ -508,9 +508,9 @@ void InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime, ...@@ -508,9 +508,9 @@ void InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime,
// FIXME: expose the status details in the interface. // FIXME: expose the status details in the interface.
Status Stat( Status Stat(
StringRef(Path.str().begin(), Name.end() - Path.str().begin()), StringRef(Path.str().begin(), Name.end() - Path.str().begin()),
getNextVirtualUniqueID(), llvm::sys::TimeValue(ModificationTime), 0, getNextVirtualUniqueID(), llvm::sys::TimeValue(ModificationTime, 0),
0, Buffer->getBufferSize(), llvm::sys::fs::file_type::directory_file, 0, 0, Buffer->getBufferSize(),
llvm::sys::fs::all_all); llvm::sys::fs::file_type::directory_file, llvm::sys::fs::all_all);
Dir = cast<detail::InMemoryDirectory>(Dir->addChild( Dir = cast<detail::InMemoryDirectory>(Dir->addChild(
Name, llvm::make_unique<detail::InMemoryDirectory>(std::move(Stat)))); Name, llvm::make_unique<detail::InMemoryDirectory>(std::move(Stat))));
continue; continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment