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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212004
91177308-0d34-0410-b5e6-
96231b3b80d8
// 31: VFPv3 40: VFPv4
Builder.defineMacro("_M_ARM_FP", "31");
}
+ BuiltinVaListKind getBuiltinVaListKind() const override {
+ return TargetInfo::CharPtrBuiltinVaList;
+ }
};
// Windows ARM + Itanium C++ ABI Target
--- /dev/null
+// RUN: %clang_cc1 -triple thumbv7--windows-msvc -std=c++11 -fsyntax-only -fms-compatibility -x c++ %s
+
+#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");
+}