[all-commits] [llvm/llvm-project] 7e6f2b: [libc++] Fix clock selection in chrono.cpp and fil...

Louis Dionne via All-commits all-commits at lists.llvm.org
Wed Jul 12 15:07:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e6f2b749bf784ddf0c1287835bb3df8749d2b9b
      https://github.com/llvm/llvm-project/commit/7e6f2b749bf784ddf0c1287835bb3df8749d2b9b
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-07-12 (Wed, 12 Jul 2023)

  Changed paths:
    M libcxx/src/chrono.cpp
    M libcxx/src/filesystem/filesystem_clock.cpp

  Log Message:
  -----------
  [libc++] Fix clock selection in chrono.cpp and filesystem_clock.cpp

This patch partly reverts the change that was made in 5f1ba3a502
regarding the clock selection on Apple platforms. It turns out that
gettimeofday() is marked as obsolete by POSIX and clock_gettime() is
recommended instead. Since both are equivalent for our purposes,
prefer using clock_gettime() even on Apple platforms.

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




More information about the All-commits mailing list