blob: bedaec947e7aec975d44811e2b56c2557c23bf0a [file] [log] [blame]
Eric Christopherfd015a52011-07-26 18:39:16 +00001// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2// This should pass for any endianness combination of host and target.
3
4// This bit is taken from Sema/wchar.c so we can avoid the wchar.h include.
5typedef __WCHAR_TYPE__ wchar_t;
6#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \
7 || defined(_M_X64) || defined(SHORT_WCHAR)
8 #define WCHAR_T_TYPE unsigned short
9#elif defined(__sun) || defined(__AuroraUX__)
10 #define WCHAR_T_TYPE long
11#else /* Solaris or AuroraUX. */
12 #define WCHAR_T_TYPE int
13#endif
14
15
16// CHECK: @.str = private unnamed_addr constant [72 x i8] c"
17extern void foo(const wchar_t* p);
18int main (int argc, const char * argv[])
19{
20 foo(L"This is some text");
21 return 0;
22}