[PATCH] D54826: [Support/FileSystem] Add sub-second precision for atime/mtime of sys::fs::file_status on unix platforms
Aaron Ballman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 25 13:01:13 PST 2018
aaron.ballman accepted this revision.
aaron.ballman added a comment.
Aside from a minor consistency nit, I think this LGTM. I don't think there's a reasonable way to test this behavior, so it's fine to go in without a test.
================
Comment at: include/llvm/Config/config.h.cmake:212
+/* Define to 1 if stat struct has st_mtimespec member, and to 0 if it doesn't.*/
+#cmakedefine01 HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
+
----------------
Is there a reason to not use `#cmakedefine` like the other uses?
================
Comment at: lib/Support/Unix/Path.inc:595
+ uint32_t atime_nsec, mtime_nsec;
+#if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
+ atime_nsec = Status.st_atimespec.tv_nsec;
----------------
...and switch these to using `#ifdef` or `#if defined()`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54826/new/
https://reviews.llvm.org/D54826
More information about the llvm-commits
mailing list