teak-llvm/clang/test/Preprocessor/feature_tests.c
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00

32 lines
799 B
C

// RUN: %clang_cc1 %s -triple=i686-apple-darwin9
// RUN: %clang_cc1 %s -E -triple=i686-apple-darwin9
#ifndef __has_feature
#error Should have __has_feature
#endif
#if __has_feature(something_we_dont_have)
#error Bad
#endif
#if !__has_builtin(__builtin_huge_val) || \
!__has_builtin(__builtin_shufflevector) || \
!__has_builtin(__builtin_trap) || \
!__has_feature(attribute_analyzer_noreturn) || \
!__has_feature(attribute_overloadable)
#error Clang should have these
#endif
#if __has_builtin(__builtin_insanity)
#error Clang should not have this
#endif
// Make sure we have x86 builtins only (forced with target triple).
#if !__has_builtin(__builtin_ia32_emms) || \
__has_builtin(__builtin_altivec_abs_v4sf)
#error Broken handling of target-specific builtins
#endif