1 //===------- Common definitions for LLVM-libc public header files- --------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIBC___COMMON_H
10 #define LLVM_LIBC___COMMON_H
11 
12 #ifdef __cplusplus
13 
14 #undef __BEGIN_C_DECLS
15 #define __BEGIN_C_DECLS extern "C" {
16 
17 #undef __END_C_DECLS
18 #define __END_C_DECLS }
19 
20 #else // not __cplusplus
21 
22 #undef __BEGIN_C_DECLS
23 #define __BEGIN_C_DECLS
24 
25 #undef __END_C_DECLS
26 #define __END_C_DECLS
27 
28 #undef __restrict
29 #define __restrict restrict // C99 and above support the restrict keyword.
30 
31 #endif // __cplusplus
32 
33 #endif // LLVM_LIBC___COMMON_H
34