Disallow direct inclusion of avxintrin.h. Users should include immintrin.h instead. This matches GCC's behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111692 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Headers/avxintrin.h b/lib/Headers/avxintrin.h
index 160f4c1..884d31c 100644
--- a/lib/Headers/avxintrin.h
+++ b/lib/Headers/avxintrin.h
@@ -21,12 +21,9 @@
*===-----------------------------------------------------------------------===
*/
-#ifndef __AVXINTRIN_H
-#define __AVXINTRIN_H
-
-#ifndef __AVX__
-#error "AVX instruction set not enabled"
-#else
+#ifndef __IMMINTRIN_H
+#error "Never use <avxintrin.h> directly; include <immintrin.h> instead."
+#endif
typedef double __v4df __attribute__ ((__vector_size__ (32)));
typedef float __v8sf __attribute__ ((__vector_size__ (32)));
@@ -1157,7 +1154,3 @@
__m128i zero = _mm_setzero_si128();
return __builtin_shufflevector(in, zero, 0, 1, 2, 2);
}
-
-#endif /* __AVX__ */
-
-#endif /* __AVXINTRIN_H */