brintos

brintos / llvm-project-archived public Read only

0
0
Text · 962 B · 86cbc6d Raw
31 lines · c
1// RUN: %clang_cc1 -fsyntax-only -triple arm64-- -DARM -verify %s2// RUN: %clang_cc1 -fsyntax-only -triple x86_64-- -DX86 -verify %s3// RUN: %clang_cc1 -fsyntax-only -triple powerpc64-unknown-linux-gnu -DPPC \4// RUN:   -verify %s5// RUN: %clang_cc1 -fsyntax-only -triple riscv32-unknown-linux-gnu -DRISCV \6// RUN:   -verify %s7// RUN: %clang_cc1 -fsyntax-only -triple riscv64-unknown-linux-gnu -DRISCV \8// RUN:   -verify %s9// expected-no-diagnostics10#if __has_builtin(__builtin_cpu_is)11# if defined(ARM)12#   error "ARM shouldn't have __builtin_cpu_is"13# endif14#endif15 16#if __has_builtin(__builtin_cpu_init)17# if defined(ARM) || defined(PPC)18#   error "ARM/PPC shouldn't have __builtin_cpu_init"19# endif20#else21# ifdef RISCV22#   error "RISCV should have __builtin_cpu_init"23# endif24#endif25 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# endif30#endif31