From: Anders Carlsson Date: Fri, 18 Sep 2009 19:18:19 +0000 (+0000) Subject: Make our char vector types not be explicitly signed to match GCC and to fix compilati... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4bf4e3034e23cc3c177b7c6dda39b28e689e7ed6;p=clang 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 --- 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 +#include +#include +#include +#include