aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Preprocessor/has_builtin_cpuid.c
blob: 8de6331e62d6e770a6b98bc0c64221bb75583042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -fsyntax-only -triple arm64-- -DARM -verify %s
// RUN: %clang_cc1 -fsyntax-only -triple x86_64-- -DX86 -verify %s
// RUN: %clang_cc1 -fsyntax-only -triple powerpc64-unknown-linux-gnu -DPPC \
// RUN:   -verify %s
// expected-no-diagnostics
#if __has_builtin(__builtin_cpu_is)
# ifdef ARM
#   error "ARM shouldn't have __builtin_cpu_is"
# endif
#endif
#if __has_builtin(__builtin_cpu_init)
# if defined(ARM) || defined(PPC)
#   error "ARM/PPC shouldn't have __builtin_cpu_init"
# endif
#endif
#if __has_builtin(__builtin_cpu_supports)
# ifdef ARM
#   error "ARM shouldn't have __builtin_cpu_supports"
# endif
#endif