blob: 6f9e0d2a63edfb2fa503a534ed0a4c6b5d96b69c [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"
Rafael Espindolab266a1f2011-01-17 16:31:00 +00005// CHECK-LSB: @.str2 = internal unnamed_addr 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", align 2
Daniel Dunbar70ee9752009-07-23 23:41:22 +00006
Daniel Dunbara5728872009-12-15 20:14:24 +00007// RUN: %clang_cc1 -triple powerpc-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix MSB %s
Daniel Dunbar70ee9752009-07-23 23:41:22 +00008
Rafael Espindola1257bc62011-01-10 22:34:03 +00009// CHECK-MSB: @.str = private unnamed_addr constant [8 x i8] c"string0\00"
Rafael Espindoladc0f1372011-03-14 21:08:19 +000010// CHECK-MSB: @.str1 = linker_private unnamed_addr constant [8 x i8] c"string1\00"
Rafael Espindolab266a1f2011-01-17 16:31:00 +000011// CHECK-MSB: @.str2 = internal unnamed_addr constant [36 x i8] c"\00h\00e\00l\00l\00o\00 !\92\00 &\03\00 !\90\00 \00w\00o\00r\00l\00d\00\00", align 2
Daniel Dunbar8e5c2b82009-03-31 23:42:16 +000012
13const char *g0 = "string0";
14const void *g1 = __builtin___CFStringMakeConstantString("string1");
Daniel Dunbara9668e02009-04-03 00:57:44 +000015const void *g2 = __builtin___CFStringMakeConstantString("hello \u2192 \u2603 \u2190 world");
Daniel Dunbar434da482009-08-03 21:47:08 +000016const void *g3 = __builtin___CFStringMakeConstantString("testâ„¢");