Headers: conditionalise more declarations

Protect MMX specific declarations under a __MMX__ guard.  This header can be
included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA.
Use the preprocessor to prevent these declarations from being processed.

llvm-svn: 212512
This commit is contained in:
Saleem Abdulrasool 2014-07-08 05:46:04 +00:00
parent 60df0615b6
commit c4ebb129b7
2 changed files with 8 additions and 0 deletions

View File

@ -41,12 +41,14 @@
extern "C" {
#endif
#if defined(__MMX__)
/* And the random ones that aren't in those files. */
__m64 _m_from_float(float);
__m64 _m_from_int(int _l);
void _m_prefetch(void *);
float _m_to_float(__m64);
int _m_to_int(__m64 _M);
#endif
/* Other assorted instruction intrinsics. */
void __addfsbyte(unsigned long, unsigned char);

View File

@ -0,0 +1,6 @@
// RUN: %clang -target armv7-windows -I %S/Inputs/include -Xclang -verify -E %s
// expected-no-diagnostics
typedef __SIZE_TYPE__ size_t;
#include <Intrin.h>