[all-commits] [llvm/llvm-project] fa21c5: [libc++] Make feature-test macros consistent with ...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Jun 22 17:33:33 PDT 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: fa21c5d4cf8cf00347e89bc3c50fbaf6a5c185dd
      https://github.com/llvm/llvm-project/commit/fa21c5d4cf8cf00347e89bc3c50fbaf6a5c185dd
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M libcxx/include/__availability
    M libcxx/include/version
    R libcxx/test/std/input.output/filesystems/fs.req.macros/feature_macro.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
    M libcxx/utils/generate_feature_test_macro_components.py

  Log Message:
  -----------
  [libc++] Make feature-test macros consistent with availability macros

Before this patch, feature-test macros didn't take special availability
markup into account, which means that feature-test macros can sometimes
appear to "lie". For example, if you compile in C++20 mode and target
macOS 10.13, the __cpp_lib_filesystem feature-test macro will be provided
even though the <filesystem> declarations are marked as unavailable.
This patch fixes that.

rdar://68142369

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

(cherry picked from commit 76fc35752d19ac605c1c1fd757af9c7c3bb4a906)




More information about the All-commits mailing list