Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix LSB %s |
Daniel Dunbar | 8e5c2b8 | 2009-03-31 23:42:16 +0000 | [diff] [blame] | 2 | |
Daniel Dunbar | 70ee975 | 2009-07-23 23:41:22 +0000 | [diff] [blame] | 3 | // CHECK-LSB: @.str = private constant [8 x i8] c"string0\00" |
Chris Lattner | 278b9f0 | 2009-10-14 05:55:45 +0000 | [diff] [blame] | 4 | // CHECK-LSB: @.str1 = private constant [8 x i8] c"string1\00" |
| 5 | // CHECK-LSB: @.str2 = internal constant [36 x i8] c"h\00e\00l\00l\00o\00 \00\92! \00\03& \00\90! \00w\00o\00r\00l\00d\00\00\00", section "__TEXT,__ustring", align 2 |
Daniel Dunbar | 70ee975 | 2009-07-23 23:41:22 +0000 | [diff] [blame] | 6 | |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame^] | 7 | // RUN: %clang_cc1 -triple powerpc-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix MSB %s |
Daniel Dunbar | 70ee975 | 2009-07-23 23:41:22 +0000 | [diff] [blame] | 8 | |
| 9 | // CHECK-MSB: @.str = private constant [8 x i8] c"string0\00" |
Chris Lattner | 278b9f0 | 2009-10-14 05:55:45 +0000 | [diff] [blame] | 10 | // CHECK-MSB: @.str1 = private constant [8 x i8] c"string1\00" |
| 11 | // CHECK-MSB: @.str2 = internal constant [36 x i8] c"\00h\00e\00l\00l\00o\00 !\92\00 &\03\00 !\90\00 \00w\00o\00r\00l\00d\00\00", section "__TEXT,__ustring", align 2 |
Daniel Dunbar | 8e5c2b8 | 2009-03-31 23:42:16 +0000 | [diff] [blame] | 12 | |
| 13 | const char *g0 = "string0"; |
| 14 | const void *g1 = __builtin___CFStringMakeConstantString("string1"); |
Daniel Dunbar | a9668e0 | 2009-04-03 00:57:44 +0000 | [diff] [blame] | 15 | const void *g2 = __builtin___CFStringMakeConstantString("hello \u2192 \u2603 \u2190 world"); |
Daniel Dunbar | 434da48 | 2009-08-03 21:47:08 +0000 | [diff] [blame] | 16 | const void *g3 = __builtin___CFStringMakeConstantString("testâ„¢"); |