aboutsummaryrefslogtreecommitdiff
path: root/lib/Headers
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-04-19 17:00:14 +0000
committerReid Kleckner <reid@kleckner.net>2013-04-19 17:00:14 +0000
commitf0cdc84298103e57919674bd1781624c74ab76d3 (patch)
treeafaafc525b7cdc92911a25b70b65167ce9bff940 /lib/Headers
parentb80a16eadd0dacabfc1c32412e243ccb99dd664d (diff)
Avoid names like __in that conflict with SAL in builtin headers
Microsoft's Source Annotation Language (SAL) defines a bunch of keywords for annotating the inputs and outputs of functions. Empty definitions for the keywords are provided by <stdlib.h> -> <crtdefs.h> -> <sal.h>. This makes it basically impossible to include MSVC's stdlib.h and Clang's *mmintrin.h headers at the same time if they have variables named __in. As a workaround, I've renamed those variables. This fixes the Modules/compiler_builtins.m test which was XFAILed, presumably due to this conflict. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Headers')
-rw-r--r--lib/Headers/avxintrin.h48
-rw-r--r--lib/Headers/emmintrin.h24
2 files changed, 36 insertions, 36 deletions
diff --git a/lib/Headers/avxintrin.h b/lib/Headers/avxintrin.h
index 412d284f00..0683a65fac 100644
--- a/lib/Headers/avxintrin.h
+++ b/lib/Headers/avxintrin.h
@@ -1078,78 +1078,78 @@ _mm256_setzero_si256(void)
/* Cast between vector types */
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd_ps(__m256d __in)
+_mm256_castpd_ps(__m256d __a)
{
- return (__m256)__in;
+ return (__m256)__a;
}
static __inline __m256i __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd_si256(__m256d __in)
+_mm256_castpd_si256(__m256d __a)
{
- return (__m256i)__in;
+ return (__m256i)__a;
}
static __inline __m256d __attribute__((__always_inline__, __nodebug__))
-_mm256_castps_pd(__m256 __in)
+_mm256_castps_pd(__m256 __a)
{
- return (__m256d)__in;
+ return (__m256d)__a;
}
static __inline __m256i __attribute__((__always_inline__, __nodebug__))
-_mm256_castps_si256(__m256 __in)
+_mm256_castps_si256(__m256 __a)
{
- return (__m256i)__in;
+ return (__m256i)__a;
}
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi256_ps(__m256i __in)
+_mm256_castsi256_ps(__m256i __a)
{
- return (__m256)__in;
+ return (__m256)__a;
}
static __inline __m256d __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi256_pd(__m256i __in)
+_mm256_castsi256_pd(__m256i __a)
{
- return (__m256d)__in;
+ return (__m256d)__a;
}
static __inline __m128d __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd256_pd128(__m256d __in)
+_mm256_castpd256_pd128(__m256d __a)
{
- return __builtin_shufflevector(__in, __in, 0, 1);
+ return __builtin_shufflevector(__a, __a, 0, 1);
}
static __inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm256_castps256_ps128(__m256 __in)
+_mm256_castps256_ps128(__m256 __a)
{
- return __builtin_shufflevector(__in, __in, 0, 1, 2, 3);
+ return __builtin_shufflevector(__a, __a, 0, 1, 2, 3);
}
static __inline __m128i __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi256_si128(__m256i __in)
+_mm256_castsi256_si128(__m256i __a)
{
- return __builtin_shufflevector(__in, __in, 0, 1);
+ return __builtin_shufflevector(__a, __a, 0, 1);
}
static __inline __m256d __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd128_pd256(__m128d __in)
+_mm256_castpd128_pd256(__m128d __a)
{
__m128d __zero = _mm_setzero_pd();
- return __builtin_shufflevector(__in, __zero, 0, 1, 2, 2);
+ return __builtin_shufflevector(__a, __zero, 0, 1, 2, 2);
}
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
-_mm256_castps128_ps256(__m128 __in)
+_mm256_castps128_ps256(__m128 __a)
{
__m128 __zero = _mm_setzero_ps();
- return __builtin_shufflevector(__in, __zero, 0, 1, 2, 3, 4, 4, 4, 4);
+ return __builtin_shufflevector(__a, __zero, 0, 1, 2, 3, 4, 4, 4, 4);
}
static __inline __m256i __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi128_si256(__m128i __in)
+_mm256_castsi128_si256(__m128i __a)
{
__m128i __zero = _mm_setzero_si128();
- return __builtin_shufflevector(__in, __zero, 0, 1, 2, 2);
+ return __builtin_shufflevector(__a, __zero, 0, 1, 2, 2);
}
/* SIMD load ops (unaligned) */
diff --git a/lib/Headers/emmintrin.h b/lib/Headers/emmintrin.h
index e18fae40ec..56c6c22855 100644
--- a/lib/Headers/emmintrin.h
+++ b/lib/Headers/emmintrin.h
@@ -1379,39 +1379,39 @@ _mm_movemask_pd(__m128d __a)
__builtin_shufflevector(__a, __b, (i) & 1, (((i) & 2) >> 1) + 2); })
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_castpd_ps(__m128d __in)
+_mm_castpd_ps(__m128d __a)
{
- return (__m128)__in;
+ return (__m128)__a;
}
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
-_mm_castpd_si128(__m128d __in)
+_mm_castpd_si128(__m128d __a)
{
- return (__m128i)__in;
+ return (__m128i)__a;
}
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
-_mm_castps_pd(__m128 __in)
+_mm_castps_pd(__m128 __a)
{
- return (__m128d)__in;
+ return (__m128d)__a;
}
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
-_mm_castps_si128(__m128 __in)
+_mm_castps_si128(__m128 __a)
{
- return (__m128i)__in;
+ return (__m128i)__a;
}
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_castsi128_ps(__m128i __in)
+_mm_castsi128_ps(__m128i __a)
{
- return (__m128)__in;
+ return (__m128)__a;
}
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
-_mm_castsi128_pd(__m128i __in)
+_mm_castsi128_pd(__m128i __a)
{
- return (__m128d)__in;
+ return (__m128d)__a;
}
static __inline__ void __attribute__((__always_inline__, __nodebug__))