diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-09-18 16:12:14 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-09-18 16:12:14 +0000 |
| commit | 3f307518f8bea834e7ba0fb522e990063d09cfb3 (patch) | |
| tree | 58bb96b5a82d0dad24be2a2d7ee92939a55f4579 /clang/test/CodeGenObjCXX | |
| parent | 0c54dc862e5c9dae681a43299126376757615cab (diff) | |
| download | bcm5719-llvm-3f307518f8bea834e7ba0fb522e990063d09cfb3.tar.gz bcm5719-llvm-3f307518f8bea834e7ba0fb522e990063d09cfb3.zip | |
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
Diffstat (limited to 'clang/test/CodeGenObjCXX')
| -rw-r--r-- | clang/test/CodeGenObjCXX/encode.mm | 2 | ||||
| -rw-r--r-- | clang/test/CodeGenObjCXX/lambda-expressions.mm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/CodeGenObjCXX/encode.mm b/clang/test/CodeGenObjCXX/encode.mm index 26d682d39cd..5bb4a1ecfa9 100644 --- a/clang/test/CodeGenObjCXX/encode.mm +++ b/clang/test/CodeGenObjCXX/encode.mm @@ -213,7 +213,7 @@ public: 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 31e84737226..35c747c71dd 100644 --- a/clang/test/CodeGenObjCXX/lambda-expressions.mm +++ b/clang/test/CodeGenObjCXX/lambda-expressions.mm @@ -6,8 +6,8 @@ fp f() { auto x = []{ return 3; }; return x; } // 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*) |

