Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Preprocessor / is_target_arm.c
blob9e1afe6ec6c1581250856fe9fc17101d9a5452ff
1 // RUN: %clang_cc1 -fsyntax-only -triple thumbv7--windows-msvc19.11.0 -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -triple armv7--windows-msvc19.11.0 -DARM -verify %s
3 // expected-no-diagnostics
5 // ARM does match arm and thumb.
6 #if !__is_target_arch(arm)
7 #error "mismatching arch"
8 #endif
10 #if __is_target_arch(armeb) || __is_target_arch(armebv7) || __is_target_arch(thumbeb) || __is_target_arch(thumbebv7)
11 #error "mismatching arch"
12 #endif
14 // ARMV7 does match armv7 and thumbv7.
15 #if !__is_target_arch(armv7)
16 #error "mismatching arch"
17 #endif
19 // ARMV6 does not match armv7 or thumbv7.
20 #if __is_target_arch(armv6)
21 #error "mismatching arch"
22 #endif
24 #if __is_target_arch(arm64)
25 #error "mismatching arch"
26 #endif
28 #ifndef ARM
30 // Allow checking for precise arch + subarch.
31 #if !__is_target_arch(thumbv7)
32 #error "mismatching arch"
33 #endif
35 // But also allow checking for the arch without subarch.
36 #if !__is_target_arch(thumb)
37 #error "mismatching arch"
38 #endif
40 // Same arch with a different subarch doesn't match.
41 #if __is_target_arch(thumbv6)
42 #error "mismatching arch"
43 #endif
45 #else
47 #if __is_target_arch(thumbv7) || __is_target_arch(thumb)
48 #error "mismatching arch"
49 #endif
51 #endif