[libcxx-commits] [PATCH] D131435: [libcxx] Make stdatomic.h work when included from a C source file

Shoaib Meenai via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 9 17:16:40 PDT 2022


smeenai added a comment.

In D131435#3709364 <https://reviews.llvm.org/D131435#3709364>, @philnik wrote:

> This won't change anything. All the code is guarded by `_LIBCPP_STD_VER > 20`. `_LIBCPP_STD_VER` also isn't defined when compiled for C, so it's `#if 0 > 20`, which is obviously not the case.

The `#elif` that I'm changing is for that `#if`, so we'll fall through to it and include the Clang resource directory's `stdatomic.h` after my change. I verified that this did fix my actual issue, but I also came up with an alternative solution, so I don't need this patch anymore. I'm happy to abandon if we'd rather not take this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131435



More information about the libcxx-commits mailing list