summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/immintrin.h
diff options
context:
space:
mode:
authorWarren Ristow <warren_ristow@playstation.sony.com>2019-12-19 11:40:50 -0800
committerWarren Ristow <warren_ristow@playstation.sony.com>2019-12-19 11:42:11 -0800
commit7fcd9e3f70830a9c4bf631a602c2764180b5c3a8 (patch)
tree9108dfc4be3511a561326c44e0c97444a2a385bc /clang/lib/Headers/immintrin.h
parente6e23a24beece5624068ff502fc74a466eedf038 (diff)
downloadbcm5719-llvm-7fcd9e3f70830a9c4bf631a602c2764180b5c3a8.tar.gz
bcm5719-llvm-7fcd9e3f70830a9c4bf631a602c2764180b5c3a8.zip
[X86] Mark various pointer arguments in builtins as const
Enabling `-Wcast-qual` identified many casts in various system headers that were dropping the `const` qualifier. Fixing those missing qualifiers pointed out that a few of the definitions of the builtins did not properly identify their arguments as `const` pointers. This commit fixes those builtin definitions, and the system header files so that they no longer drop the qualifier. Differential Revision: https://reviews.llvm.org/D71718
Diffstat (limited to 'clang/lib/Headers/immintrin.h')
-rw-r--r--clang/lib/Headers/immintrin.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h
index ae900ee85b7..edf8c42ec49 100644
--- a/clang/lib/Headers/immintrin.h
+++ b/clang/lib/Headers/immintrin.h
@@ -301,7 +301,7 @@ _loadbe_i16(void const * __P) {
struct __loadu_i16 {
short __v;
} __attribute__((__packed__, __may_alias__));
- return __builtin_bswap16(((struct __loadu_i16*)__P)->__v);
+ return __builtin_bswap16(((const struct __loadu_i16*)__P)->__v);
}
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
@@ -317,7 +317,7 @@ _loadbe_i32(void const * __P) {
struct __loadu_i32 {
int __v;
} __attribute__((__packed__, __may_alias__));
- return __builtin_bswap32(((struct __loadu_i32*)__P)->__v);
+ return __builtin_bswap32(((const struct __loadu_i32*)__P)->__v);
}
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
@@ -334,7 +334,7 @@ _loadbe_i64(void const * __P) {
struct __loadu_i64 {
long long __v;
} __attribute__((__packed__, __may_alias__));
- return __builtin_bswap64(((struct __loadu_i64*)__P)->__v);
+ return __builtin_bswap64(((const struct __loadu_i64*)__P)->__v);
}
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
OpenPOWER on IntegriCloud