brintos

brintos / llvm-project-archived public Read only

0
0
Text · 902 B · 91b14ec Raw
25 lines · c
1// RUN: %clang_cc1 -emit-llvm %s -o - -triple i386-pc-win32 | FileCheck %s --check-prefix=CHECK-WIN2// RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-apple-darwin | FileCheck %s --check-prefix=CHECK-DAR3// This should pass for any endianness combination of host and target.4 5// This bit is taken from Sema/wchar.c so we can avoid the wchar.h include.6typedef __WCHAR_TYPE__ wchar_t;7#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \8  || defined(_M_X64) || defined(SHORT_WCHAR)9  #define WCHAR_T_TYPE unsigned short10#elif defined(__sun)11  #define WCHAR_T_TYPE long12#else /* Solaris. */13  #define WCHAR_T_TYPE int14#endif15 16 17// CHECK-DAR: private unnamed_addr constant [18 x i32] [i32 84,18// CHECK-WIN: linkonce_odr dso_local unnamed_addr constant [18 x i16] [i16 84,19extern void foo(const wchar_t* p);20int main (int argc, const char * argv[])21{22 foo(L"This is some text");23 return 0;24}25