blob: dbfde4b430b7143e5a03d4b0130beecf06a993e6 [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00001// RUN: clang-cc %s --triple=i686-apple-darwin9
Chris Lattner1b63e4f2009-06-14 01:54:56 +00002// RUN: clang-cc %s -E --triple=i686-apple-darwin9
Chris Lattner148772a2009-06-13 07:13:28 +00003#ifndef __has_feature
4#error Should have __has_feature
5#endif
6
7
8#if __has_feature(something_we_dont_have)
9#error Bad
10#endif
11
12#if !__has_builtin(__builtin_huge_val) || \
13 !__has_builtin(__builtin_shufflevector) || \
14 !__has_builtin(__builtin_trap) || \
15 !__has_feature(attribute_analyzer_noreturn) || \
16 !__has_feature(attribute_overloadable)
17#error Clang should have these
18#endif
19
20#if __has_builtin(__builtin_insanity)
21#error Clang should not have this
22#endif
23
24
25
26// Make sure we have x86 builtins only (forced with target triple).
27
28#if !__has_builtin(__builtin_ia32_emms) || \
29 __has_builtin(__builtin_altivec_abs_v4sf)
30#error Broken handling of target-specific builtins
31#endif