aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-09-18 19:18:19 +0000
committerAnders Carlsson <andersca@mac.com>2009-09-18 19:18:19 +0000
commit4bf4e3034e23cc3c177b7c6dda39b28e689e7ed6 (patch)
treeed54b9e3876edc8b7d140aa0e5def98dbc2e9d02
parent97f4d46e2fffa1e8a84f2052c314a3bf87b967f8 (diff)
Make our char vector types not be explicitly signed to match GCC and to fix compilation with C++ and -fno-lax-vector-conversions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82254 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Headers/emmintrin.h2
-rw-r--r--lib/Headers/mmintrin.h2
-rw-r--r--test/Sema/x86-intrinsics-headers.c9
3 files changed, 11 insertions, 2 deletions
diff --git a/lib/Headers/emmintrin.h b/lib/Headers/emmintrin.h
index b83ed5fe02..fec01549ed 100644
--- a/lib/Headers/emmintrin.h
+++ b/lib/Headers/emmintrin.h
@@ -35,7 +35,7 @@ typedef long long __m128i __attribute__((__vector_size__(16)));
typedef int __v4si __attribute__((__vector_size__(16)));
typedef short __v8hi __attribute__((__vector_size__(16)));
-typedef signed char __v16qi __attribute__((__vector_size__(16)));
+typedef char __v16qi __attribute__((__vector_size__(16)));
static inline __m128d __attribute__((__always_inline__, __nodebug__))
_mm_add_sd(__m128d a, __m128d b)
diff --git a/lib/Headers/mmintrin.h b/lib/Headers/mmintrin.h
index e3cbe48ce0..0f06f787b6 100644
--- a/lib/Headers/mmintrin.h
+++ b/lib/Headers/mmintrin.h
@@ -32,7 +32,7 @@ typedef long long __m64 __attribute__((__vector_size__(8)));
typedef int __v2si __attribute__((__vector_size__(8)));
typedef short __v4hi __attribute__((__vector_size__(8)));
-typedef signed char __v8qi __attribute__((__vector_size__(8)));
+typedef char __v8qi __attribute__((__vector_size__(8)));
static inline void __attribute__((__always_inline__, __nodebug__))
_mm_empty(void)
diff --git a/test/Sema/x86-intrinsics-headers.c b/test/Sema/x86-intrinsics-headers.c
new file mode 100644
index 0000000000..be17696661
--- /dev/null
+++ b/test/Sema/x86-intrinsics-headers.c
@@ -0,0 +1,9 @@
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fsyntax-only --mcpu=core2 %s &&
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fsyntax-only --mcpu=core2 -fno-lax-vector-conversions %s &&
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fsyntax-only --mcpu=core2 -x c++ %s
+
+#include <emmintrin.h>
+#include <mm_malloc.h>
+#include <pmmintrin.h>
+#include <tmmintrin.h>
+#include <xmmintrin.h>