CodeGen: mark ObjC cstring literals as unnamed_addr
These are all emitted into a section with a cstring_literal attribute. The
attribute permits the linker to coalesce the string contents. The address of
the strings are not important.
llvm-svn: 281855
diff --git a/clang/test/CodeGenObjCXX/encode.mm b/clang/test/CodeGenObjCXX/encode.mm
index 26d682d..5bb4a1e 100644
--- a/clang/test/CodeGenObjCXX/encode.mm
+++ b/clang/test/CodeGenObjCXX/encode.mm
@@ -213,7 +213,7 @@
dynamic_class dynamic_class_ivar;
}
@end
-// CHECK: private constant [41 x i8] c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
+// CHECK: private unnamed_addr constant [41 x i8] c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
namespace PR17142 {
struct A { virtual ~A(); };
diff --git a/clang/test/CodeGenObjCXX/lambda-expressions.mm b/clang/test/CodeGenObjCXX/lambda-expressions.mm
index 31e8473..35c747c 100644
--- a/clang/test/CodeGenObjCXX/lambda-expressions.mm
+++ b/clang/test/CodeGenObjCXX/lambda-expressions.mm
@@ -6,8 +6,8 @@
// ARC: %[[LAMBDACLASS:.*]] = type { i32 }
-// MRC: @OBJC_METH_VAR_NAME{{.*}} = private constant [5 x i8] c"copy\00"
-// MRC: @OBJC_METH_VAR_NAME{{.*}} = private constant [12 x i8] c"autorelease\00"
+// MRC: @OBJC_METH_VAR_NAME{{.*}} = private unnamed_addr constant [5 x i8] c"copy\00"
+// MRC: @OBJC_METH_VAR_NAME{{.*}} = private unnamed_addr constant [12 x i8] c"autorelease\00"
// MRC-LABEL: define i32 ()* @_Z1fv(
// MRC-LABEL: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
// MRC: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*)