r212512 - Headers: conditionalise more declarations

Saleem Abdulrasool abdulras at fb.com
Tue Jul 8 15:00:05 PDT 2014


On Jul 8, 2014, at 1:00 PM, Reid Kleckner <rnk at google.com> wrote:

> As mentioned on IRC, we should just merge this with test/Headers/ms-intrin.cpp with another RUN line for WoA.

As mentioned on IRC, SVN r212563 (sorry, too easy to be cheeky here!).

> 
> On Mon, Jul 7, 2014 at 10:46 PM, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> Author: compnerd
> Date: Tue Jul  8 00:46:04 2014
> New Revision: 212512
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=212512&view=rev
> Log:
> 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.
> 
> Added:
>     cfe/trunk/test/Headers/arm-intrin.c
> Modified:
>     cfe/trunk/lib/Headers/Intrin.h
> 
> Modified: cfe/trunk/lib/Headers/Intrin.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=212512&r1=212511&r2=212512&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Headers/Intrin.h (original)
> +++ cfe/trunk/lib/Headers/Intrin.h Tue Jul  8 00:46:04 2014
> @@ -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);
> 
> Added: cfe/trunk/test/Headers/arm-intrin.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/arm-intrin.c?rev=212512&view=auto
> ==============================================================================
> --- cfe/trunk/test/Headers/arm-intrin.c (added)
> +++ cfe/trunk/test/Headers/arm-intrin.c Tue Jul  8 00:46:04 2014
> @@ -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>
> +
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> https://urldefense.proofpoint.com/v1/url?u=http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=CchYc4lrV44%2BZqxZADw0BQ%3D%3D%0A&m=7GFNnyjVtZp6gN8cMznsEMYhfb1cYJ9RpW24wCoa5D8%3D%0A&s=86e011fa83bab663668836c2a3c0b93c03fce2b17fa6a4534fd1a803bf2b4a1c

-- 
Saleem Abdulrasool
abdulras (at) fb (dot) com









More information about the cfe-commits mailing list