[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:39:06 PST 2018


aaron.ballman added inline comments.


================
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
+
----------------
akyrtzi wrote:
> aaron.ballman wrote:
> > Is there a reason to not use `#cmakedefine` like the other uses?
> This file is not consistent on what it uses, it has uses of `#cmakedefine01` in some places but majority is with `#cmakedefine`.
> I mainly liked to use `#if HAVE_STRUCT_STAT.. ` directly since it reads more naturally, but if you prefer it the other way I will switch.
I don't have a strong opinion; I just noticed everything around it in the patch context was using `#cmakedefine`. I have a weak preference for `#cmakedefine` because the resulting macro cannot produce a value (it can only be used in a conditional preprocessor test). The strength of that argument should tell you about how strong my preference is. ;-)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54826/new/

https://reviews.llvm.org/D54826





More information about the llvm-commits mailing list