r212004 - Basic: correct the va_list type on Windows on ARM

Alp Toker alp at nuanti.com
Mon Jun 30 11:04:24 PDT 2014


Nice, thanks!

On 30/06/2014 05:23, Saleem Abdulrasool wrote:
> On Sun, Jun 29, 2014 at 6:56 PM, Alp Toker <alp at nuanti.com 
> <mailto:alp at nuanti.com>> wrote:
>
>
>     On 30/06/2014 02:05, Saleem Abdulrasool wrote:
>
>         Author: compnerd
>         Date: Sun Jun 29 18:05:41 2014
>         New Revision: 212004
>
>         URL: http://llvm.org/viewvc/llvm-project?rev=212004&view=rev
>         Log:
>         Basic: correct the va_list type on Windows on ARM
>
>         Windows on ARM defines va_list as a typedef for char *.
>          Although the semantics
>         of argument passing for variadic functions matches AAPCS VFP,
>         the wrapped
>         struct __va_list type is unused.  This makes the intrinsic
>         definition for
>         va_list match that of Visual Studio.
>
>         Added:
>              cfe/trunk/test/CodeGenCXX/windows-arm-valist.cpp
>         Modified:
>              cfe/trunk/lib/Basic/Targets.cpp
>
>         Modified: cfe/trunk/lib/Basic/Targets.cpp
>         URL:
>         http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=212004&r1=212003&r2=212004&view=diff
>         ==============================================================================
>         --- cfe/trunk/lib/Basic/Targets.cpp (original)
>         +++ cfe/trunk/lib/Basic/Targets.cpp Sun Jun 29 18:05:41 2014
>         @@ -4231,6 +4231,9 @@ public:
>               // 31: VFPv3 40: VFPv4
>               Builder.defineMacro("_M_ARM_FP", "31");
>             }
>         +  BuiltinVaListKind getBuiltinVaListKind() const override {
>         +    return TargetInfo::CharPtrBuiltinVaList;
>         +  }
>           };
>             // Windows ARM + Itanium C++ ABI Target
>
>         Added: cfe/trunk/test/CodeGenCXX/windows-arm-valist.cpp
>         URL:
>         http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/windows-arm-valist.cpp?rev=212004&view=auto
>         ==============================================================================
>         --- cfe/trunk/test/CodeGenCXX/windows-arm-valist.cpp (added)
>         +++ cfe/trunk/test/CodeGenCXX/windows-arm-valist.cpp Sun Jun
>         29 18:05:41 2014
>         @@ -0,0 +1,16 @@
>         +// RUN: %clang_cc1 -triple thumbv7--windows-msvc -std=c++11
>         -fsyntax-only -fms-compatibility -x c++ %s
>
>
>     This looks like a SemaCXX test to me, not CodeGenCXX.
>
>     Also add -verify and drop -fms-compatibility -x c++
>
>
> SVN r212009.
>
>     Alp.
>
>
>         +
>         +#include <stdarg.h>
>         +
>         +template <typename lhs_, typename rhs_>
>         +struct is_same { enum { value = 0 }; };
>         +
>         +template <typename type_>
>         +struct is_same<type_, type_> { enum { value = 1 }; };
>         +
>         +void check() {
>         +  va_list va;
>         +  char *cp;
>         +  static_assert(is_same<decltype(va), decltype(cp)>::value,
>         +                "type mismatch for va_list");
>         +}
>
>
>         _______________________________________________
>         cfe-commits mailing list
>         cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
>         http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
>     -- 
>     http://www.nuanti.com
>     the browser experts
>
>
>
>
> -- 
> Saleem Abdulrasool
> compnerd (at) compnerd (dot) org

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-commits mailing list