diff options
| -rw-r--r-- | clang/include/clang/Basic/VirtualFileSystem.h | 1 | ||||
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/VirtualFileSystem.h b/clang/include/clang/Basic/VirtualFileSystem.h index e977aa606e6..84db321c2e9 100644 --- a/clang/include/clang/Basic/VirtualFileSystem.h +++ b/clang/include/clang/Basic/VirtualFileSystem.h @@ -19,6 +19,7 @@ #include "llvm/Support/ErrorOr.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/SourceMgr.h" +#include "llvm/Support/TimeValue.h" #include "llvm/Support/raw_ostream.h" #include <utility> diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 2467758a56f..7d77cd1bb91 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -5576,9 +5576,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, llvm::sys::fs::file_status Status; if (llvm::sys::fs::status(A->getValue(), Status)) D.Diag(diag::err_drv_no_such_file) << A->getValue(); - CmdArgs.push_back(Args.MakeArgString( - "-fbuild-session-timestamp=" + - Twine((uint64_t)Status.getLastModificationTime().toEpochTime()))); + CmdArgs.push_back( + Args.MakeArgString("-fbuild-session-timestamp=" + + Twine((uint64_t)Status.getLastModificationTime() + .time_since_epoch() + .count()))); } if (Args.getLastArg(options::OPT_fmodules_validate_once_per_build_session)) { |

