Introduce TargetInfo::hasFeature() to query various feature names in
each of the targets. Use this for module requirements, so that we can
pin the availability of certain modules to certain target features,
e.g., provide a module for xmmintrin.h only when SSE support is
available.
Use these feature names to provide a nearly-complete module map for
Clang's built-in headers. Only mm_alloc.h and unwind.h are missing,
and those two are fairly specialized at the moment. Finishes
<rdar://problem/10710060>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149227 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Modules/compiler_builtins.m b/test/Modules/compiler_builtins.m
index 38ce2c9..a451e8a 100644
--- a/test/Modules/compiler_builtins.m
+++ b/test/Modules/compiler_builtins.m
@@ -13,3 +13,11 @@
char getCharMax() { return CHAR_MAX; }
size_t size; // expected-error{{unknown type name 'size_t'}}
+
+#ifdef __SSE__
+@import __compiler_builtins.intel.sse;
+#endif
+
+#ifdef __AVX2__
+@import __compiler_builtins.intel.avx2;
+#endif