From d9a5459e980c14e2e19edef8dd31d7020268b162 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 26 Jul 2011 20:27:12 +0000 Subject: [PATCH] Add CodeGen/2009-07-15-pad-wchar_t-array.c migrated from test/FrontendC and modified to avoid includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136126 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/2009-07-15-pad-wchar_t-array.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/CodeGen/2009-07-15-pad-wchar_t-array.c diff --git a/test/CodeGen/2009-07-15-pad-wchar_t-array.c b/test/CodeGen/2009-07-15-pad-wchar_t-array.c new file mode 100644 index 0000000000..df12cae90e --- /dev/null +++ b/test/CodeGen/2009-07-15-pad-wchar_t-array.c @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm %s -o /dev/null + +// This bit is taken from Sema/wchar.c so we can avoid the wchar.h include. +typedef __WCHAR_TYPE__ wchar_t; +#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \ + || defined(_M_X64) || defined(SHORT_WCHAR) + #define WCHAR_T_TYPE unsigned short +#elif defined(__sun) || defined(__AuroraUX__) + #define WCHAR_T_TYPE long +#else /* Solaris or AuroraUX. */ + #define WCHAR_T_TYPE int +#endif + +signed short _iodbcdm_sqlerror( ) +{ + wchar_t _sqlState[6] = { L"\0" }; +} -- 2.40.0