<div dir="ltr">On Sun, Jun 29, 2014 at 6:56 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
On 30/06/2014 02:05, Saleem Abdulrasool wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Author: compnerd<br>
Date: Sun Jun 29 18:05:41 2014<br>
New Revision: 212004<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=212004&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=212004&view=rev</a><br>
Log:<br>
Basic: correct the va_list type on Windows on ARM<br>
<br>
Windows on ARM defines va_list as a typedef for char *.  Although the semantics<br>
of argument passing for variadic functions matches AAPCS VFP, the wrapped<br>
struct __va_list type is unused.  This makes the intrinsic definition for<br>
va_list match that of Visual Studio.<br>
<br>
Added:<br>
     cfe/trunk/test/CodeGenCXX/<u></u>windows-arm-valist.cpp<br>
Modified:<br>
     cfe/trunk/lib/Basic/Targets.<u></u>cpp<br>
<br>
Modified: cfe/trunk/lib/Basic/Targets.<u></u>cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=212004&r1=212003&r2=212004&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/lib/Basic/<u></u>Targets.cpp?rev=212004&r1=<u></u>212003&r2=212004&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/lib/Basic/Targets.<u></u>cpp (original)<br>
+++ cfe/trunk/lib/Basic/Targets.<u></u>cpp Sun Jun 29 18:05:41 2014<br>
@@ -4231,6 +4231,9 @@ public:<br>
      // 31: VFPv3 40: VFPv4<br>
      Builder.defineMacro("_M_ARM_<u></u>FP", "31");<br>
    }<br>
+  BuiltinVaListKind getBuiltinVaListKind() const override {<br>
+    return TargetInfo::<u></u>CharPtrBuiltinVaList;<br>
+  }<br>
  };<br>
    // Windows ARM + Itanium C++ ABI Target<br>
<br>
Added: cfe/trunk/test/CodeGenCXX/<u></u>windows-arm-valist.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/windows-arm-valist.cpp?rev=212004&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/windows-arm-valist.<u></u>cpp?rev=212004&view=auto</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>windows-arm-valist.cpp (added)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>windows-arm-valist.cpp Sun Jun 29 18:05:41 2014<br>
@@ -0,0 +1,16 @@<br>
+// RUN: %clang_cc1 -triple thumbv7--windows-msvc -std=c++11 -fsyntax-only -fms-compatibility -x c++ %s<br>
</blockquote>
<br></div></div>
This looks like a SemaCXX test to me, not CodeGenCXX.<br>
<br>
Also add -verify and drop -fms-compatibility -x c++<br></blockquote><div><br></div><div>SVN r212009.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Alp.<div class=""><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+<br>
+#include <stdarg.h><br>
+<br>
+template <typename lhs_, typename rhs_><br>
+struct is_same { enum { value = 0 }; };<br>
+<br>
+template <typename type_><br>
+struct is_same<type_, type_> { enum { value = 1 }; };<br>
+<br>
+void check() {<br>
+  va_list va;<br>
+  char *cp;<br>
+  static_assert(is_same<<u></u>decltype(va), decltype(cp)>::value,<br>
+                "type mismatch for va_list");<br>
+}<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/cfe-commits</a><br>
</blockquote>
<br></div></div><span class=""><font color="#888888">
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>