blob: 457ff6ca7aeee9d244526c97a61c30e6341c210b [file] [log] [blame]
Nico Weber9762e0a2010-10-06 04:57:26 +00001// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
Seo Sanghyeon6f1b2742007-12-23 03:11:58 +00002
3int main() {
Nico Weber9762e0a2010-10-06 04:57:26 +00004 // CHECK: internal constant [10 x i8] c"abc\00\00\00\00\00\00\00", align 1
Seo Sanghyeon6f1b2742007-12-23 03:11:58 +00005 char a[10] = "abc";
Chris Lattnerd42c29f2009-02-26 23:01:51 +00006
Nico Weber9762e0a2010-10-06 04:57:26 +00007 // This should convert to utf8.
8 // CHECK: internal constant [10 x i8] c"\E1\84\A0\C8\A0\F4\82\80\B0\00", align 1
9 char b[10] = "\u1120\u0220\U00102030";
10
11 // CHECK: private constant [12 x i8] c"A\00\00\00B\00\00\00\00\00\00\00"
Chris Lattnerd42c29f2009-02-26 23:01:51 +000012 void *foo = L"AB";
Nico Weber9762e0a2010-10-06 04:57:26 +000013
14 // CHECK: private constant [12 x i8] c"4\12\00\00\0B\F0\10\00\00\00\00\00"
15 void *bar = L"\u1234\U0010F00B";
Seo Sanghyeon6f1b2742007-12-23 03:11:58 +000016}