]> granicus.if.org Git - clang/commitdiff
Add CodeGen/2009-07-15-pad-wchar_t-array.c migrated from test/FrontendC
authorEric Christopher <echristo@apple.com>
Tue, 26 Jul 2011 20:27:12 +0000 (20:27 +0000)
committerEric Christopher <echristo@apple.com>
Tue, 26 Jul 2011 20:27:12 +0000 (20:27 +0000)
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 [new file with mode: 0644]

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 (file)
index 0000000..df12cae
--- /dev/null
@@ -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" };
+}