<div dir="ltr">As mentioned on IRC, we should just merge this with test/Headers/ms-intrin.cpp with another RUN line for WoA.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 7, 2014 at 10:46 PM, Saleem Abdulrasool <span dir="ltr"><<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: compnerd<br>
Date: Tue Jul  8 00:46:04 2014<br>
New Revision: 212512<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=212512&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=212512&view=rev</a><br>
Log:<br>
Headers: conditionalise more declarations<br>
<br>
Protect MMX specific declarations under a __MMX__ guard.  This header can be<br>
included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA.<br>
Use the preprocessor to prevent these declarations from being processed.<br>
<br>
Added:<br>
    cfe/trunk/test/Headers/arm-intrin.c<br>
Modified:<br>
    cfe/trunk/lib/Headers/Intrin.h<br>
<br>
Modified: cfe/trunk/lib/Headers/Intrin.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=212512&r1=212511&r2=212512&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=212512&r1=212511&r2=212512&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Headers/Intrin.h (original)<br>
+++ cfe/trunk/lib/Headers/Intrin.h Tue Jul  8 00:46:04 2014<br>
@@ -41,12 +41,14 @@<br>
 extern "C" {<br>
 #endif<br>
<br>
+#if defined(__MMX__)<br>
 /* And the random ones that aren't in those files. */<br>
 __m64 _m_from_float(float);<br>
 __m64 _m_from_int(int _l);<br>
 void _m_prefetch(void *);<br>
 float _m_to_float(__m64);<br>
 int _m_to_int(__m64 _M);<br>
+#endif<br>
<br>
 /* Other assorted instruction intrinsics. */<br>
 void __addfsbyte(unsigned long, unsigned char);<br>
<br>
Added: cfe/trunk/test/Headers/arm-intrin.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/arm-intrin.c?rev=212512&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/arm-intrin.c?rev=212512&view=auto</a><br>

==============================================================================<br>
--- cfe/trunk/test/Headers/arm-intrin.c (added)<br>
+++ cfe/trunk/test/Headers/arm-intrin.c Tue Jul  8 00:46:04 2014<br>
@@ -0,0 +1,6 @@<br>
+// RUN: %clang -target armv7-windows -I %S/Inputs/include -Xclang -verify -E %s<br>
+// expected-no-diagnostics<br>
+<br>
+typedef __SIZE_TYPE__ size_t;<br>
+#include <Intrin.h><br>
+<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>