Author: compnerd
Date: Sun Sep 18 11:12:04 2016
New Revision: 281854

URL: http://llvm.org/viewvc/llvm-project?rev=281854&view=rev
Log:
CodeGen: mark ObjC cstring literals as constant

These strings are constants, mark them as such.  This doesn't matter too much in
practice on MachO since the constants are placed into a special section and not
referred to directly.

Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
    cfe/trunk/test/CodeGenObjC/boxing.m
    cfe/trunk/test/CodeGenObjC/complex-property.m
    cfe/trunk/test/CodeGenObjC/encode-cstyle-method.m
    cfe/trunk/test/CodeGenObjC/encode-test-6.m
    cfe/trunk/test/CodeGenObjC/encode-test.m
    cfe/trunk/test/CodeGenObjC/fragile-arc.m
    cfe/trunk/test/CodeGenObjC/ivar-layout-64.m
    cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m
    cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m
    cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m
    cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios.m
    cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m
    cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac.m
    cfe/trunk/test/CodeGenObjC/objc-asm-attribute-test.m
    cfe/trunk/test/CodeGenObjC/property-list-in-extension.m
    cfe/trunk/test/CodeGenObjC/reorder-synthesized-ivars.m
    cfe/trunk/test/CodeGenObjCXX/encode.mm
    cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sun Sep 18 11:12:04 2016
@@ -3691,7 +3691,8 @@ CGObjCCommonMac::CreateCStringLiteral(St
 
   llvm::Constant *Value = llvm::ConstantDataArray::getString(VMContext, Name);
   llvm::GlobalVariable *GV =
-      new llvm::GlobalVariable(CGM.getModule(), Value->getType(), false,
+      new llvm::GlobalVariable(CGM.getModule(), Value->getType(),
+                               /*isConstant=*/true,
                                llvm::GlobalValue::PrivateLinkage, Value, 
Label);
   GV->setSection(Section);
   GV->setAlignment(CharUnits::One().getQuantity());

Modified: cfe/trunk/test/CodeGenObjC/boxing.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/boxing.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/boxing.m (original)
+++ cfe/trunk/test/CodeGenObjC/boxing.m Sun Sep 18 11:12:04 2016
@@ -53,17 +53,17 @@ typedef signed char BOOL;
 + (id)stringWithUTF8String:(const char *)nullTerminatedCString;
 @end
 
-// CHECK: [[WithIntMeth:@.*]] = private global [15 x i8] c"numberWithInt:\00"
+// CHECK: [[WithIntMeth:@.*]] = private constant [15 x i8] c"numberWithInt:\00"
 // CHECK: [[WithIntSEL:@.*]] = private externally_initialized global i8* 
getelementptr inbounds ([15 x i8], [15 x i8]* [[WithIntMeth]]
-// CHECK: [[WithCharMeth:@.*]] = private global [16 x i8] c"numberWithChar:\00"
+// CHECK: [[WithCharMeth:@.*]] = private constant [16 x i8] 
c"numberWithChar:\00"
 // CHECK: [[WithCharSEL:@.*]] = private externally_initialized global i8* 
getelementptr inbounds ([16 x i8], [16 x i8]* [[WithCharMeth]]
-// CHECK: [[WithBoolMeth:@.*]] = private global [16 x i8] c"numberWithBool:\00"
+// CHECK: [[WithBoolMeth:@.*]] = private constant [16 x i8] 
c"numberWithBool:\00"
 // CHECK: [[WithBoolSEL:@.*]] = private externally_initialized global i8* 
getelementptr inbounds ([16 x i8], [16 x i8]* [[WithBoolMeth]]
-// CHECK: [[WithIntegerMeth:@.*]] = private global [19 x i8] 
c"numberWithInteger:\00"
+// CHECK: [[WithIntegerMeth:@.*]] = private constant [19 x i8] 
c"numberWithInteger:\00"
 // CHECK: [[WithIntegerSEL:@.*]] = private externally_initialized global i8* 
getelementptr inbounds ([19 x i8], [19 x i8]* [[WithIntegerMeth]]
-// CHECK: [[WithUnsignedIntegerMeth:@.*]] = private global [27 x i8] 
c"numberWithUnsignedInteger:\00"
+// CHECK: [[WithUnsignedIntegerMeth:@.*]] = private constant [27 x i8] 
c"numberWithUnsignedInteger:\00"
 // CHECK: [[WithUnsignedIntegerSEL:@.*]] = private externally_initialized 
global i8* getelementptr inbounds ([27 x i8], [27 x i8]* 
[[WithUnsignedIntegerMeth]]
-// CHECK: [[stringWithUTF8StringMeth:@.*]] = private global [22 x i8] 
c"stringWithUTF8String:\00"
+// CHECK: [[stringWithUTF8StringMeth:@.*]] = private constant [22 x i8] 
c"stringWithUTF8String:\00"
 // CHECK: [[stringWithUTF8StringSEL:@.*]] = private externally_initialized 
global i8* getelementptr inbounds ([22 x i8], [22 x i8]* 
[[stringWithUTF8StringMeth]]
 
 int main() {

Modified: cfe/trunk/test/CodeGenObjC/complex-property.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/complex-property.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/complex-property.m (original)
+++ cfe/trunk/test/CodeGenObjC/complex-property.m Sun Sep 18 11:12:04 2016
@@ -13,8 +13,8 @@ void f0(A *a) {
   a.y += a1;
 }
 
-// CHECK-LP64: private global [13 x i8] c"COMPLEX_PROP
-// CHECK-LP64: private global [17 x i8] c"setCOMPLEX_PROP
+// CHECK-LP64: private constant [13 x i8] c"COMPLEX_PROP
+// CHECK-LP64: private constant [17 x i8] c"setCOMPLEX_PROP
 
 // rdar: // 7351147
 @interface B

Modified: cfe/trunk/test/CodeGenObjC/encode-cstyle-method.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/encode-cstyle-method.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/encode-cstyle-method.m (original)
+++ cfe/trunk/test/CodeGenObjC/encode-cstyle-method.m Sun Sep 18 11:12:04 2016
@@ -8,4 +8,4 @@
 @implementation Foo
 - (id)test:(id )one, id two {return two; } @end
 
-// CHECK-LP64: private global [11 x i8] c"@24@0:8@16
+// CHECK-LP64: private constant [11 x i8] c"@24@0:8@16

Modified: cfe/trunk/test/CodeGenObjC/encode-test-6.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/encode-test-6.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/encode-test-6.m (original)
+++ cfe/trunk/test/CodeGenObjC/encode-test-6.m Sun Sep 18 11:12:04 2016
@@ -14,8 +14,8 @@ typedef struct {} Z;
 -(void)foo:(Z)a: (char*)b : (Z)c : (double) d {}
 @end
 
-// CHECK: private global [14 x i8] c"v16@0:8{?=}16
-// CHECK: private global [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
+// CHECK: private constant [14 x i8] c"v16@0:8{?=}16
+// CHECK: private constant [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
 
 
 // rdar://13190095
@@ -34,7 +34,7 @@ typedef BABugExample BABugExampleRedefin
 @synthesize property = _property;
 @end
 
-// CHECK: private global [24 x i8] c"^{BABugExample=@}16
+// CHECK: private constant [24 x i8] c"^{BABugExample=@}16
 
 // rdar://14408244
 @class SCNCamera;
@@ -52,7 +52,7 @@ typedef struct
     C3DCameraStorage _storage;
 }
 @end
-// CHECK: private global [39 x i8] 
c"{?=\22presentationInstance\22^{SCNCamera}}\00"
+// CHECK: private constant [39 x i8] 
c"{?=\22presentationInstance\22^{SCNCamera}}\00"
 
 // rdar://16655340
 int i;

Modified: cfe/trunk/test/CodeGenObjC/encode-test.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/encode-test.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/encode-test.m (original)
+++ cfe/trunk/test/CodeGenObjC/encode-test.m Sun Sep 18 11:12:04 2016
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple i686-apple-darwin9 
-fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s
 // RUN: FileCheck < %t %s
 //
-// CHECK: @OBJC_METH_VAR_TYPE_.34 = private global [16 x i8] 
c"v12@0:4[3[4@]]8\00"
+// CHECK: @OBJC_METH_VAR_TYPE_.34 = private constant [16 x i8] 
c"v12@0:4[3[4@]]8\00"
 
 @class Int1;
 

Modified: cfe/trunk/test/CodeGenObjC/fragile-arc.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/fragile-arc.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/fragile-arc.m (original)
+++ cfe/trunk/test/CodeGenObjC/fragile-arc.m Sun Sep 18 11:12:04 2016
@@ -16,9 +16,9 @@
 
 // GLOBALS-LABEL @OBJC_METACLASS_A
 //  Strong layout: scan the first word.
-// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private global [2 x i8] c"\01\00"
+// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private constant [2 x i8] c"\01\00"
 //  Weak layout: skip the first word, scan the second word.
-// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private global [2 x i8] c"\11\00"
+// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private constant [2 x i8] c"\11\00"
 
 //  0x04002001
 //     ^ is compiled by ARC (controls interpretation of layouts)
@@ -119,9 +119,9 @@
 // GLOBALS-LABEL: @OBJC_METACLASS_C
 //  Strong layout: skip five, scan four, skip three, scan seven
 //    'T' == 0x54, '7' == 0x37
-// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private global [3 x i8] c"T7\00"
+// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private constant [3 x i8] c"T7\00"
 //  Weak layout: skip nine, scan three
-// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private global [2 x i8] c"\93\00"
+// GLOBALS: @OBJC_CLASS_NAME_{{.*}} = private constant [2 x i8] c"\93\00"
 
 extern void useBlock(void (^block)(void));
 

Modified: cfe/trunk/test/CodeGenObjC/ivar-layout-64.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/ivar-layout-64.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/ivar-layout-64.m (original)
+++ cfe/trunk/test/CodeGenObjC/ivar-layout-64.m Sun Sep 18 11:12:04 2016
@@ -33,9 +33,9 @@ __weak B *f2;
 @property int p3;
 @end
 
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"C\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\11p\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"!`\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"C\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\11p\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"!`\00"
 
 
 @implementation C
@@ -48,9 +48,9 @@ __weak B *f2;
 @property (assign) __weak id p2;
 @end
 
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"A\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\11q\10\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"!q\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"A\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\11q\10\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"!q\00"
 
 @implementation A
 @synthesize p0 = _p0;
@@ -62,9 +62,9 @@ __weak B *f2;
 @property int p3;
 @end
 
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"D\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\11p\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"!`\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"D\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\11p\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"!`\00"
 
 @implementation D
 @synthesize p3 = _p3;
@@ -89,8 +89,8 @@ typedef unsigned int FSCatalogInfoBitmap
 }
 @end
 
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} 
c"NSFileLocationComponent\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\01\14\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} 
c"NSFileLocationComponent\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\01\14\00"
 
 @implementation NSFileLocationComponent @end
 
@@ -108,8 +108,8 @@ typedef unsigned int FSCatalogInfoBitmap
 }
 @end
 
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"Foo\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\02\10\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"Foo\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\02\10\00"
 
 @implementation Foo @end
 
@@ -124,8 +124,8 @@ struct __attribute__((packed)) PackedStr
 }
 @end
 @implementation Packed @end
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"Packed\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\01 \00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"Packed\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\01 \00"
 //  ' ' == 0x20
 
 // Ensure that layout descends into anonymous unions and structs.
@@ -142,8 +142,8 @@ struct __attribute__((packed)) PackedStr
 }
 @end
 @implementation AnonymousUnion @end
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"AnonymousUnion\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\02\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} 
c"AnonymousUnion\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\02\00"
 
 @interface AnonymousStruct : NSObject {
   struct {
@@ -155,7 +155,7 @@ struct __attribute__((packed)) PackedStr
 }
 @end
 @implementation AnonymousStruct @end
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"AnonymousStruct\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"\02\10\00"
-// CHECK: @OBJC_CLASS_NAME_{{.*}} = private global {{.*}} c"!\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} 
c"AnonymousStruct\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"\02\10\00"
+// CHECK: @OBJC_CLASS_NAME_{{.*}} = private constant {{.*}} c"!\00"
 //  '!' == 0x21

Modified: cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m (original)
+++ cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m Sun Sep 18 11:12:04 2016
@@ -2,11 +2,11 @@
 
 // CHECK: .lazy_reference .objc_class_name_J0
 
-// CHECK: @OBJC_METH_VAR_NAME_{{[0-9]*}} = private global {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
-// CHECK: @OBJC_METH_VAR_TYPE_{{[0-9]*}} = private global {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @OBJC_METH_VAR_NAME_{{[0-9]*}} = private constant {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @OBJC_METH_VAR_TYPE_{{[0-9]*}} = private constant {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
 // CHECK: @"\01l_OBJC_PROTOCOLEXT_P" = private global
 // CHECK-NOT: section
-// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private global {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private constant {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
 // CHECK: @OBJC_PROTOCOL_INSTANCE_METHODS_P = private global {{.*}}section 
"__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
 // CHECK: @OBJC_PROTOCOL_CLASS_METHODS_P = private global {{.*}}section 
"__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
 // CHECK: @OBJC_PROTOCOL_P = private global {{.*}}section 
"__OBJC,__protocol,regular,no_dead_strip", align 4
@@ -15,7 +15,7 @@
 // CHECK: @OBJC_METACLASS_A = private global {{.*}}section 
"__OBJC,__meta_class,regular,no_dead_strip", align 4
 // CHECK: @OBJC_INSTANCE_VARIABLES_A = private global {{.*}}section 
"__OBJC,__instance_vars,regular,no_dead_strip", align 4
 // CHECK: @OBJC_INSTANCE_METHODS_A = private global {{.*}}section 
"__OBJC,__inst_meth,regular,no_dead_strip", align 4
-// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private global {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private constant {{.*}}section 
"__TEXT,__cstring,cstring_literals", align 1
 // CHECK: @"\01l_OBJC_$_PROP_LIST_A" = private global {{.*}}section 
"__OBJC,__property,regular,no_dead_strip", align 4
 // CHECK: @OBJC_CLASSEXT_A = private global {{.*}}section 
"__OBJC,__class_ext,regular,no_dead_strip", align 4
 // CHECK: @OBJC_CLASS_A = private global {{.*}}section 
"__OBJC,__class,regular,no_dead_strip", align 4

Modified: cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m (original)
+++ cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m Sun Sep 18 11:12:04 2016
@@ -5,9 +5,9 @@
 // CHECK: @_objc_empty_vtable = external global
 // CHECK: @"OBJC_CLASS_$_A" = global
 // CHECK: @"OBJC_METACLASS_$_A" = global {{.*}} section "__DATA, __objc_data", 
align 8
-// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private global {{.*}} section 
"__TEXT,__objc_classname,cstring_literals", align 1
-// CHECK: @OBJC_METH_VAR_NAME_{{[0-9]*}} = private global {{.*}} section 
"__TEXT,__objc_methname,cstring_literals", align 1
-// CHECK: @OBJC_METH_VAR_TYPE_{{[0-9]*}} = private global {{.*}} section 
"__TEXT,__objc_methtype,cstring_literals", align 1
+// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private constant {{.*}} section 
"__TEXT,__objc_classname,cstring_literals", align 1
+// CHECK: @OBJC_METH_VAR_NAME_{{[0-9]*}} = private constant {{.*}} section 
"__TEXT,__objc_methname,cstring_literals", align 1
+// CHECK: @OBJC_METH_VAR_TYPE_{{[0-9]*}} = private constant {{.*}} section 
"__TEXT,__objc_methtype,cstring_literals", align 1
 // CHECK: @"\01l_OBJC_$_CLASS_METHODS_A" = private global {{.*}} section 
"__DATA, __objc_const", align 8
 // CHECK: @"\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_P" = private global {{.*}} 
section "__DATA, __objc_const", align 8
 // CHECK: @"\01l_OBJC_$_PROTOCOL_CLASS_METHODS_P" = private global {{.*}} 
section "__DATA, __objc_const", align 8
@@ -17,7 +17,7 @@
 // CHECK: @"\01l_OBJC_METACLASS_RO_$_A" = private global {{.*}} section 
"__DATA, __objc_const", align 8
 // CHECK: @"\01l_OBJC_$_INSTANCE_METHODS_A" = private global {{.*}} section 
"__DATA, __objc_const", align 8
 // CHECK: @"\01l_OBJC_$_INSTANCE_VARIABLES_A" = private global {{.*}} section 
"__DATA, __objc_const", align 8
-// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private global {{.*}} section 
"__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private constant {{.*}} section 
"__TEXT,__cstring,cstring_literals", align 1
 // CHECK: @"\01l_OBJC_$_PROP_LIST_A" = private global {{.*}} section "__DATA, 
__objc_const", align 8
 // CHECK: @"\01l_OBJC_CLASS_RO_$_A" = private global {{.*}} section "__DATA, 
__objc_const", align 8
 // CHECK: @"\01l_OBJC_$_CATEGORY_INSTANCE_METHODS_A_$_Cat" = private global 
{{.*}} section "__DATA, __objc_const", align 8

Modified: cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m (original)
+++ cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m Sun Sep 18 
11:12:04 2016
@@ -5,7 +5,7 @@
 // CHECK:      [[CLASS:@.*]]        = external global %struct._class_t
 // CHECK:      [[NSVALUE:@.*]]      = {{.*}}[[CLASS]]{{.*}}
 // CHECK:      [[RANGE_STR:.*]]     = {{.*}}_NSRange=II{{.*}}
-// CHECK:      [[METH:@.*]]         = private 
global{{.*}}valueWithBytes:objCType:{{.*}}
+// CHECK:      [[METH:@.*]]         = private constant 
{{.*}}valueWithBytes:objCType:{{.*}}
 // CHECK:      [[VALUE_SEL:@.*]]    = {{.*}}[[METH]]{{.*}}
 // CHECK:      [[POINT_STR:.*]]     = {{.*}}CGPoint=dd{{.*}}
 // CHECK:      [[SIZE_STR:.*]]      = {{.*}}CGSize=dd{{.*}}

Modified: cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios.m (original)
+++ cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-ios.m Sun Sep 18 11:12:04 
2016
@@ -5,7 +5,7 @@
 // CHECK:      [[CLASS:@.*]]        = external global %struct._class_t
 // CHECK:      [[NSVALUE:@.*]]      = {{.*}}[[CLASS]]{{.*}}
 // CHECK:      [[RANGE_STR:.*]]     = {{.*}}_NSRange=II{{.*}}
-// CHECK:      [[METH:@.*]]         = private 
global{{.*}}valueWithBytes:objCType:{{.*}}
+// CHECK:      [[METH:@.*]]         = private constant 
{{.*}}valueWithBytes:objCType:{{.*}}
 // CHECK:      [[VALUE_SEL:@.*]]    = {{.*}}[[METH]]{{.*}}
 // CHECK:      [[POINT_STR:.*]]     = {{.*}}CGPoint=dd{{.*}}
 // CHECK:      [[SIZE_STR:.*]]      = {{.*}}CGSize=dd{{.*}}

Modified: cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m (original)
+++ cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m Sun Sep 18 
11:12:04 2016
@@ -5,7 +5,7 @@
 // CHECK:      [[CLASS:@.*]]        = external global %struct._class_t
 // CHECK:      [[NSVALUE:@.*]]      = {{.*}}[[CLASS]]{{.*}}
 // CHECK:      [[RANGE_STR:.*]]     = {{.*}}_NSRange=QQ{{.*}}
-// CHECK:      [[METH:@.*]]         = private 
global{{.*}}valueWithBytes:objCType:{{.*}}
+// CHECK:      [[METH:@.*]]         = private constant 
{{.*}}valueWithBytes:objCType:{{.*}}
 // CHECK:      [[VALUE_SEL:@.*]]    = {{.*}}[[METH]]{{.*}}
 // CHECK:      [[POINT_STR:.*]]     = {{.*}}_NSPoint=dd{{.*}}
 // CHECK:      [[SIZE_STR:.*]]      = {{.*}}_NSSize=dd{{.*}}

Modified: cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac.m (original)
+++ cfe/trunk/test/CodeGenObjC/nsvalue-objc-boxable-mac.m Sun Sep 18 11:12:04 
2016
@@ -5,7 +5,7 @@
 // CHECK:      [[CLASS:@.*]]        = external global %struct._class_t
 // CHECK:      [[NSVALUE:@.*]]      = {{.*}}[[CLASS]]{{.*}}
 // CHECK:      [[RANGE_STR:.*]]     = {{.*}}_NSRange=QQ{{.*}}
-// CHECK:      [[METH:@.*]]         = private 
global{{.*}}valueWithBytes:objCType:{{.*}}
+// CHECK:      [[METH:@.*]]         = private constant 
{{.*}}valueWithBytes:objCType:{{.*}}
 // CHECK:      [[VALUE_SEL:@.*]]    = {{.*}}[[METH]]{{.*}}
 // CHECK:      [[POINT_STR:.*]]     = {{.*}}_NSPoint=dd{{.*}}
 // CHECK:      [[SIZE_STR:.*]]      = {{.*}}_NSSize=dd{{.*}}

Modified: cfe/trunk/test/CodeGenObjC/objc-asm-attribute-test.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc-asm-attribute-test.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc-asm-attribute-test.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc-asm-attribute-test.m Sun Sep 18 11:12:04 
2016
@@ -59,9 +59,9 @@ id Test16877359() {
 // CHECK: @"OBJC_CLASS_$_MySecretNamespace.Message" = global %struct._class_t
 // CHECK: @"OBJC_METACLASS_$_MySecretNamespace.Message" = global 
%struct._class_t
 
-// CHECK: private global [42 x i8] 
c"T@\22MySecretNamespace.Message\22,&,V_msgProp\00"
-// CHECK: private global [76 x i8] 
c"T@\22MySecretNamespace.Message<MySecretNamespace.Protocol3>\22,&,V_msgProtoProp\00"
-// CHECK: private global [50 x i8] 
c"T@\22<MySecretNamespace.Protocol3>\22,&,V_idProtoProp\00"
+// CHECK: private constant [42 x i8] 
c"T@\22MySecretNamespace.Message\22,&,V_msgProp\00"
+// CHECK: private constant [76 x i8] 
c"T@\22MySecretNamespace.Message<MySecretNamespace.Protocol3>\22,&,V_msgProtoProp\00"
+// CHECK: private constant [50 x i8] 
c"T@\22<MySecretNamespace.Protocol3>\22,&,V_idProtoProp\00"
 
 // CHECK: @"OBJC_CLASS_$_foo" = external global %struct._class_t
 // CHECK: define internal i8* @"\01-[Message MyMethod]"

Modified: cfe/trunk/test/CodeGenObjC/property-list-in-extension.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/property-list-in-extension.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/property-list-in-extension.m (original)
+++ cfe/trunk/test/CodeGenObjC/property-list-in-extension.m Sun Sep 18 11:12:04 
2016
@@ -17,7 +17,7 @@ __attribute__((objc_root_class))
 @end
 // Metadata for _myprop should be present, and PROP_LIST for Foo should have
 // only one entry.
-// CHECK: = private global [12 x i8] c"Ti,V_myprop\00",
+// CHECK: = private constant [12 x i8] c"Ti,V_myprop\00",
 // CHECK: @"\01l_OBJC_$_PROP_LIST_Foo" = private global { i32, i32, [1 x 
%struct._prop_t] }
 
 // Readonly property in interface made readwrite in a category:
@@ -40,8 +40,8 @@ __attribute__((objc_root_class))
 // Metadata for _evolvingprop should be present, and PROP_LIST for FooRO should
 // still have only one entry, and the one entry should point to the version of
 // the property with a getter and setter.
-// CHECK: [[evolvinggetter:@OBJC_PROP_NAME_ATTR[^ ]+]] = private global [13 x 
i8] c"evolvingprop\00"
-// CHECK: [[evolvingsetter:@OBJC_PROP_NAME_ATTR[^ ]+]] = private global [18 x 
i8] c"Ti,V_evolvingprop\00",
-// CHECK: [[booleanmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private global [34 x 
i8] c"Ti,N,GisBooleanProp,V_booleanProp\00"
-// CHECK: [[weakmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private global [23 x 
i8] c"T@\22Foo\22,W,N,V_weakProp\00"
+// CHECK: [[evolvinggetter:@OBJC_PROP_NAME_ATTR[^ ]+]] = private constant [13 
x i8] c"evolvingprop\00"
+// CHECK: [[evolvingsetter:@OBJC_PROP_NAME_ATTR[^ ]+]] = private constant [18 
x i8] c"Ti,V_evolvingprop\00",
+// CHECK: [[booleanmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private constant [34 
x i8] c"Ti,N,GisBooleanProp,V_booleanProp\00"
+// CHECK: [[weakmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private constant [23 x 
i8] c"T@\22Foo\22,W,N,V_weakProp\00"
 // CHECK: @"\01l_OBJC_$_PROP_LIST_FooRO" = private global { i32, i32, [3 x 
%struct._prop_t] 
}{{.*}}[[evolvinggetter]]{{.*}}[[evolvingsetter]]{{.*}}[[booleanmetadata]]

Modified: cfe/trunk/test/CodeGenObjC/reorder-synthesized-ivars.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/reorder-synthesized-ivars.m?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/reorder-synthesized-ivars.m (original)
+++ cfe/trunk/test/CodeGenObjC/reorder-synthesized-ivars.m Sun Sep 18 11:12:04 
2016
@@ -38,21 +38,21 @@ typedef signed char BOOL;
 }
 @end
 
-// CHECK: @{{.*}} = private global [10 x i8] c"_boolean1
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean2
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean3
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean4
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean5
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean6
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean7
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean8
-// CHECK-NEXT: @{{.*}} = private global [10 x i8] c"_boolean9
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object1
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object2
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object3
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object4
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object5
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object6
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object7
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object8
-// CHECK-NEXT: @{{.*}} = private global [9 x i8] c"_object9
+// CHECK: @{{.*}} = private constant [10 x i8] c"_boolean1
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean2
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean3
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean4
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean5
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean6
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean7
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean8
+// CHECK-NEXT: @{{.*}} = private constant [10 x i8] c"_boolean9
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object1
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object2
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object3
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object4
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object5
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object6
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object7
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object8
+// CHECK-NEXT: @{{.*}} = private constant [9 x i8] c"_object9

Modified: cfe/trunk/test/CodeGenObjCXX/encode.mm
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/encode.mm?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/encode.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/encode.mm Sun Sep 18 11:12:04 2016
@@ -213,7 +213,7 @@ public:
   dynamic_class dynamic_class_ivar;
 }
 @end
-// CHECK: private global [41 x i8] 
c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
+// CHECK: private constant [41 x i8] 
c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
 
 namespace PR17142 {
   struct A { virtual ~A(); };

Modified: cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm?rev=281854&r1=281853&r2=281854&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm Sun Sep 18 11:12:04 2016
@@ -6,8 +6,8 @@ fp f() { auto x = []{ return 3; }; retur
 
 // ARC: %[[LAMBDACLASS:.*]] = type { i32 }
 
-// MRC: @OBJC_METH_VAR_NAME{{.*}} = private global [5 x i8] c"copy\00"
-// MRC: @OBJC_METH_VAR_NAME{{.*}} = private global [12 x i8] c"autorelease\00"
+// 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-LABEL: define i32 ()* @_Z1fv(
 // MRC-LABEL: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
 // MRC: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*)


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to