[all-commits] [llvm/llvm-project] b3e392: [flang] Implement Posix version of DATE_AND_TIME r...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Aug 25 02:18:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b3e392c081ea8d04798d58631b6f61e2901c204f
      https://github.com/llvm/llvm-project/commit/b3e392c081ea8d04798d58631b6f61e2901c204f
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2021-08-25 (Wed, 25 Aug 2021)

  Changed paths:
    M flang/runtime/time-intrinsic.cpp
    M flang/runtime/time-intrinsic.h
    M flang/test/Runtime/no-cpp-dep.c
    M flang/test/lit.cfg.py
    M flang/unittests/Runtime/Time.cpp

  Log Message:
  -----------
  [flang] Implement Posix version of DATE_AND_TIME runtime

Use gettimeofday and localtime_r to implement DATE_AND_TIME intrinsic.
The Windows version fallbacks to the "no date and time information
available" defined by the standard (strings set to blanks and values to
-HUGE).

The implementation uses an ifdef between windows and the rest because
from my tests, the SFINAE approach leads to undeclared name bogus errors
with clang 8 that seems to ignore failure to instantiate is not an error
for the function names (i.e., it understands it should not instantiate
the version using gettimeofday if it is not there, but still yields an
error that it is not declared on the spot where it is called in the
uninstantiated version).

Differential Revision: https://reviews.llvm.org/D108622




More information about the All-commits mailing list