Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Preprocessor / has_builtin_cpuid.c
blobe69f912ce688ddd4ad08784087d34d9e3fbcfc2b
1 // RUN: %clang_cc1 -fsyntax-only -triple arm64-- -DARM -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-- -DX86 -verify %s
3 // RUN: %clang_cc1 -fsyntax-only -triple powerpc64-unknown-linux-gnu -DPPC \
4 // RUN: -verify %s
5 // RUN: %clang_cc1 -fsyntax-only -triple riscv32-unknown-linux-gnu -DRISCV \
6 // RUN: -verify %s
7 // RUN: %clang_cc1 -fsyntax-only -triple riscv64-unknown-linux-gnu -DRISCV \
8 // RUN: -verify %s
9 // expected-no-diagnostics
10 #if __has_builtin(__builtin_cpu_is)
11 # if defined(ARM) || defined(RISCV)
12 # error "ARM/RISCV shouldn't have __builtin_cpu_is"
13 # endif
14 #endif
16 #if __has_builtin(__builtin_cpu_init)
17 # if defined(ARM) || defined(PPC)
18 # error "ARM/PPC shouldn't have __builtin_cpu_init"
19 # endif
20 #else
21 # ifdef RISCV
22 # error "RISCV should have __builtin_cpu_init"
23 # endif
24 #endif
26 #if !__has_builtin(__builtin_cpu_supports)
27 # if defined(ARM) || defined(X86) || defined(RISCV)
28 # error "ARM/X86/RISCV should have __builtin_cpu_supports"
29 # endif
30 #endif