Headers: tweak inclusion condition for stdatomic.h
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 15 Dec 2022 20:34:04 +0000 (20:34 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 15 Dec 2022 21:50:28 +0000 (21:50 +0000)
commite0c3142af075e2ef89395dbed5939071345eb622
tree85d20d00bfcc229202d91dc19bca212771bd9e13
parent74b2a5cfbc57f84ea1a130876a8cf2bad18826e0
Headers: tweak inclusion condition for stdatomic.h

MSVC requires that C++23 be available (_HAS_CXX23) else the entire
content is elided. Conditionalise the inclusion properly so that C/C++
code using stdatomic.h for memory_order_* constants are able to do
so without changing the C++ standard. This repairs builds of Swift and
libdispatch after ba49d39b20cc5358da28af2ac82bd336028780bc.

Differential Revision: https://reviews.llvm.org/D139266
Reviewed By: aaron.ballman, Mordante, fsb4000
clang/docs/ReleaseNotes.rst
clang/lib/Headers/stdatomic.h