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 4 5 // ARM does match arm and thumb. 6 #if !__is_target_arch(arm) 7 #error "mismatching arch" 8 #endif 9 10 #if __is_target_arch(armeb) || __is_target_arch(armebv7) || __is_target_arch(thumbeb) || __is_target_arch(thumbebv7) 11 #error "mismatching arch" 12 #endif 13 14 // ARMV7 does match armv7 and thumbv7. 15 #if !__is_target_arch(armv7) 16 #error "mismatching arch" 17 #endif 18 19 // ARMV6 does not match armv7 or thumbv7. 20 #if __is_target_arch(armv6) 21 #error "mismatching arch" 22 #endif 23 24 #if __is_target_arch(arm64) 25 #error "mismatching arch" 26 #endif 27 28 #ifndef ARM 29 30 // Allow checking for precise arch + subarch. 31 #if !__is_target_arch(thumbv7) 32 #error "mismatching arch" 33 #endif 34 35 // But also allow checking for the arch without subarch. 36 #if !__is_target_arch(thumb) 37 #error "mismatching arch" 38 #endif 39 40 // Same arch with a different subarch doesn't match. 41 #if __is_target_arch(thumbv6) 42 #error "mismatching arch" 43 #endif 44 45 #else 46 47 #if __is_target_arch(thumbv7) || __is_target_arch(thumb) 48 #error "mismatching arch" 49 #endif 50 51 #endif 52