Aaron Ballman 5ab944a8c6
[C2y] Add stdcountof.h (#140890)
WG14 N3469 changed _Lengthof to _Countof but it also introduced the
<stdcountof.h> header to expose a macro with a non-ugly identifier. GCC
vends this header as part of the compiler implementation, so Clang
should do the same.

Suggested-by: Alejandro Colomar <alx@kernel.org>
2025-05-28 06:41:01 -04:00

16 lines
473 B
C

/*===---- stdcountof.h - Standard header for countof -----------------------===
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
*===-----------------------------------------------------------------------===
*/
#ifndef __STDCOUNTOF_H
#define __STDCOUNTOF_H
#define countof _Countof
#endif /* __STDCOUNTOF_H */