forked from OSchip/llvm-project
prfchwintrin.h: Make _m_prefetchw take a pointer to volatile (PR49124)
For some reason, Microsoft declares _m_prefetch to take a const void*, but _m_prefetchw to take a /volatile/ const void*. Do the same for compatibility. Differential revision: https://reviews.llvm.org/D106790
This commit is contained in:
parent
c423a586a7
commit
12dc13b73c
|
@ -47,9 +47,12 @@ _m_prefetch(void *__P)
|
|||
/// \param __P
|
||||
/// A pointer specifying the memory address to be prefetched.
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetchw(void *__P)
|
||||
_m_prefetchw(volatile const void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wcast-qual"
|
||||
__builtin_prefetch ((const void*)__P, 1, 3 /* _MM_HINT_T0 */);
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
|
|
Loading…
Reference in New Issue