[OpenACC] Treat 'delete' as a valid clause during parsing in C++ mode
[llvm-project.git] / libc / src / __support / macros / properties / architectures.h
blobc88956ff41148ecd029a42b1f20aea7108d1af07
1 //===-- Compile time architecture detection ---------------------*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_ARCHITECTURES_H
10 #define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_ARCHITECTURES_H
12 #if defined(__AMDGPU__)
13 #define LIBC_TARGET_ARCH_IS_AMDGPU
14 #endif
16 #if defined(__NVPTX__)
17 #define LIBC_TARGET_ARCH_IS_NVPTX
18 #endif
20 #if defined(LIBC_TARGET_ARCH_IS_NVPTX) || defined(LIBC_TARGET_ARCH_IS_AMDGPU)
21 #define LIBC_TARGET_ARCH_IS_GPU
22 #endif
24 #if defined(__pnacl__) || defined(__CLR_VER) || defined(LIBC_TARGET_ARCH_IS_GPU)
25 #define LIBC_TARGET_ARCH_IS_VM
26 #endif
28 #if (defined(_M_IX86) || defined(__i386__)) && !defined(LIBC_TARGET_ARCH_IS_VM)
29 #define LIBC_TARGET_ARCH_IS_X86_32
30 #endif
32 #if (defined(_M_X64) || defined(__x86_64__)) && !defined(LIBC_TARGET_ARCH_IS_VM)
33 #define LIBC_TARGET_ARCH_IS_X86_64
34 #endif
36 #if defined(LIBC_TARGET_ARCH_IS_X86_32) || defined(LIBC_TARGET_ARCH_IS_X86_64)
37 #define LIBC_TARGET_ARCH_IS_X86
38 #endif
40 #if (defined(__arm__) || defined(_M_ARM))
41 #define LIBC_TARGET_ARCH_IS_ARM
42 #endif
44 #if defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64)
45 #define LIBC_TARGET_ARCH_IS_AARCH64
46 #endif
48 #if defined(LIBC_TARGET_ARCH_IS_AARCH64) || defined(LIBC_TARGET_ARCH_IS_ARM)
49 #define LIBC_TARGET_ARCH_IS_ANY_ARM
50 #endif
52 #if defined(__riscv) && (__riscv_xlen == 64)
53 #define LIBC_TARGET_ARCH_IS_RISCV64
54 #endif
56 #if defined(__riscv) && (__riscv_xlen == 32)
57 #define LIBC_TARGET_ARCH_IS_RISCV32
58 #endif
60 #if defined(LIBC_TARGET_ARCH_IS_RISCV64) || defined(LIBC_TARGET_ARCH_IS_RISCV32)
61 #define LIBC_TARGET_ARCH_IS_ANY_RISCV
62 #endif
64 #endif // LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_ARCHITECTURES_H