[flang-commits] [PATCH] D108622: [flang] Implement Posix version of DATE_AND_TIME runtime

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Aug 24 04:36:03 PDT 2021


jeanPerier created this revision.
jeanPerier added reviewers: klausler, kiranchandramohan, rovka.
jeanPerier added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
jeanPerier requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108622

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108622.368318.patch
Type: text/x-patch
Size: 14365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210824/a4eb7e6d/attachment-0001.bin>


More information about the flang-commits mailing list