summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/darwin-string-literals.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-14 05:55:45 +0000
committerChris Lattner <sabre@nondot.org>2009-10-14 05:55:45 +0000
commit4f8a2e22c0e49b871288fefa44ddffc7833ff15c (patch)
treeb487020459265fb574c17d92db774cb2a5e75da8 /clang/test/CodeGen/darwin-string-literals.c
parent4ae411e096c2811a534a373142f359ee82c394a7 (diff)
downloadbcm5719-llvm-4f8a2e22c0e49b871288fefa44ddffc7833ff15c.tar.gz
bcm5719-llvm-4f8a2e22c0e49b871288fefa44ddffc7833ff15c.zip
fix some cfstring related issues:
1) -fwritable-string does affect the non-utf16 version of cfstrings just not the utf16 ones. 2) utf16 strings should always be marked constant, as the __TEXT segment is readonly. 3) The name of the global doesn't matter, remove it from TargetInfo. 4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now. This fixes rdar://7115750 llvm-svn: 84077
Diffstat (limited to 'clang/test/CodeGen/darwin-string-literals.c')
-rw-r--r--clang/test/CodeGen/darwin-string-literals.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/CodeGen/darwin-string-literals.c b/clang/test/CodeGen/darwin-string-literals.c
index 3be24b1bce9..04e43a234d1 100644
--- a/clang/test/CodeGen/darwin-string-literals.c
+++ b/clang/test/CodeGen/darwin-string-literals.c
@@ -1,14 +1,14 @@
// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix LSB %s &&
// CHECK-LSB: @.str = private constant [8 x i8] c"string0\00"
-// CHECK-LSB: @.str1 = private constant [8 x i8] c"string1\00", section "__TEXT,__cstring,cstring_literals"
-// CHECK-LSB: @__utf16_string_ = internal global [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
+// CHECK-LSB: @.str1 = private constant [8 x i8] c"string1\00"
+// 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
// RUN: clang-cc -triple powerpc-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix MSB %s
// CHECK-MSB: @.str = private constant [8 x i8] c"string0\00"
-// CHECK-MSB: @.str1 = private constant [8 x i8] c"string1\00", section "__TEXT,__cstring,cstring_literals"
-// CHECK-MSB: @__utf16_string_ = internal global [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
+// CHECK-MSB: @.str1 = private constant [8 x i8] c"string1\00"
+// 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
const char *g0 = "string0";
const void *g1 = __builtin___CFStringMakeConstantString("string1");
OpenPOWER on IntegriCloud