blob: 968386a90e985ac1add61da357951587f5f71675 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix LSB %s
Daniel Dunbar8e5c2b82009-03-31 23:42:16 +00002
Rafael Espindola1257bc62011-01-10 22:34:03 +00003// CHECK-LSB: @.str = private unnamed_addr constant [8 x i8] c"string0\00"
Rafael Espindoladc0f1372011-03-14 21:08:19 +00004// CHECK-LSB: @.str1 = linker_private unnamed_addr constant [8 x i8] c"string1\00"
Bill Wendling84392d02012-03-30 00:26:17 +00005// CHECK-LSB: @.str2 = internal unnamed_addr constant [18 x i16] [i16 104, i16 101, i16 108, i16 108, i16 111, i16 32, i16 8594, i16 32, i16 9731, i16 32, i16 8592, i16 32, i16 119, i16 111, i16 114, i16 108, i16 100, i16 0], align 2
6// CHECK-LSB: @.str4 = internal unnamed_addr constant [6 x i16] [i16 116, i16 101, i16 115, i16 116, i16 8482, i16 0], align 2
7
Daniel Dunbar70ee9752009-07-23 23:41:22 +00008
Daniel Dunbara5728872009-12-15 20:14:24 +00009// RUN: %clang_cc1 -triple powerpc-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix MSB %s
Daniel Dunbar70ee9752009-07-23 23:41:22 +000010
Rafael Espindola1257bc62011-01-10 22:34:03 +000011// CHECK-MSB: @.str = private unnamed_addr constant [8 x i8] c"string0\00"
Rafael Espindoladc0f1372011-03-14 21:08:19 +000012// CHECK-MSB: @.str1 = linker_private unnamed_addr constant [8 x i8] c"string1\00"
Bill Wendling84392d02012-03-30 00:26:17 +000013// CHECK-MSB: @.str2 = internal unnamed_addr constant [18 x i16] [i16 104, i16 101, i16 108, i16 108, i16 111, i16 32, i16 8594, i16 32, i16 9731, i16 32, i16 8592, i16 32, i16 119, i16 111, i16 114, i16 108, i16 100, i16 0], align 2
14// CHECK-MSB: @.str4 = internal unnamed_addr constant [6 x i16] [i16 116, i16 101, i16 115, i16 116, i16 8482, i16 0], align 2
Daniel Dunbar8e5c2b82009-03-31 23:42:16 +000015
16const char *g0 = "string0";
17const void *g1 = __builtin___CFStringMakeConstantString("string1");
Daniel Dunbara9668e02009-04-03 00:57:44 +000018const void *g2 = __builtin___CFStringMakeConstantString("hello \u2192 \u2603 \u2190 world");
Daniel Dunbar434da482009-08-03 21:47:08 +000019const void *g3 = __builtin___CFStringMakeConstantString("testâ„¢");