The only usage there was in GetModificationTime(). I also took the opportunity
to move this function from FileSpec to the FileSystem class - since we are
using FileSpecs to also represent remote files for which we cannot (easily)
retrieve modification time, it makes sense to make the decision to get the
modification time more explicit.
The new function returns a std::duration::time_point. To aid the transition
from TimeValue, I have added a constructor to it which enables implicit
conversion from a time_point.
I wonder if it would be worth defining some typedefs in LLVM's Chrono.h that Mehdi is adding to make things like this less verbose. For example:
Now, with all that aside, I'm not sure we actually need this function here (or many of the other functions for that matter). LLVM has llvm::support::fs::status() which will return you a file_status object which contains the modification time. I wonder if we should use that instead. It currently uses an llvm::TimeValue, but the conversion to chrono could happen at that level presumably.