forked from OSchip/llvm-project
Use private linkage for globals we already name with \01L and \01l.
In llvm the only semantic difference between internal and private is that llvm tries to hide private globals my mangling them with a private prefix. Since the globals changed by this patch already had the magic don't mangle marker, there should be no change in the generated assembly. A followup patch should then be able to drop the \01L and \01l prefixes and let llvm mangle as appropriate. llvm-svn: 202419
This commit is contained in:
parent
7fe38e1ade
commit
5179a4ea28
|
@ -2570,7 +2570,8 @@ llvm::Constant *CGObjCCommonMac::GetProtocolRef(const ObjCProtocolDecl *PD) {
|
|||
static void assertPrivateName(const llvm::GlobalValue *GV) {
|
||||
StringRef NameRef = GV->getName();
|
||||
assert(NameRef[0] == '\01' && (NameRef[1] == 'L' || NameRef[1] == 'l'));
|
||||
assert(GV->getLinkage() == llvm::GlobalValue::InternalLinkage);
|
||||
assert(GV->getVisibility() == llvm::GlobalValue::DefaultVisibility);
|
||||
assert(GV->getLinkage() == llvm::GlobalValue::PrivateLinkage);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2662,7 +2663,7 @@ llvm::Constant *CGObjCMac::GetOrEmitProtocol(const ObjCProtocolDecl *PD) {
|
|||
} else {
|
||||
Entry =
|
||||
new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ProtocolTy, false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Init,
|
||||
"\01L_OBJC_PROTOCOL_" + PD->getName());
|
||||
Entry->setSection("__OBJC,__protocol,regular,no_dead_strip");
|
||||
|
@ -2686,7 +2687,7 @@ llvm::Constant *CGObjCMac::GetOrEmitProtocolRef(const ObjCProtocolDecl *PD) {
|
|||
// contents for protocols which were referenced but never defined.
|
||||
Entry =
|
||||
new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ProtocolTy, false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
0,
|
||||
"\01L_OBJC_PROTOCOL_" + PD->getName());
|
||||
Entry->setSection("__OBJC,__protocol,regular,no_dead_strip");
|
||||
|
@ -3219,7 +3220,7 @@ llvm::Constant *CGObjCMac::EmitMetaClass(const ObjCImplementationDecl *ID,
|
|||
GV->setInitializer(Init);
|
||||
} else {
|
||||
GV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassTy, false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Init, Name);
|
||||
}
|
||||
assertPrivateName(GV);
|
||||
|
@ -3244,7 +3245,7 @@ llvm::Constant *CGObjCMac::EmitMetaClassRef(const ObjCInterfaceDecl *ID) {
|
|||
llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name, true);
|
||||
if (!GV)
|
||||
GV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassTy, false,
|
||||
llvm::GlobalValue::InternalLinkage, 0, Name);
|
||||
llvm::GlobalValue::PrivateLinkage, 0, Name);
|
||||
|
||||
assert(GV->getType()->getElementType() == ObjCTypes.ClassTy &&
|
||||
"Forward metaclass reference has incorrect type.");
|
||||
|
@ -3258,7 +3259,7 @@ llvm::Value *CGObjCMac::EmitSuperClassRef(const ObjCInterfaceDecl *ID) {
|
|||
|
||||
if (!GV)
|
||||
GV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassTy, false,
|
||||
llvm::GlobalValue::InternalLinkage, 0, Name);
|
||||
llvm::GlobalValue::PrivateLinkage, 0, Name);
|
||||
|
||||
assert(GV->getType()->getElementType() == ObjCTypes.ClassTy &&
|
||||
"Forward class metadata reference has incorrect type.");
|
||||
|
@ -3435,7 +3436,7 @@ CGObjCCommonMac::CreateMetadataVar(Twine Name,
|
|||
llvm::Type *Ty = Init->getType();
|
||||
llvm::GlobalVariable *GV =
|
||||
new llvm::GlobalVariable(CGM.getModule(), Ty, false,
|
||||
llvm::GlobalValue::InternalLinkage, Init, Name);
|
||||
llvm::GlobalValue::PrivateLinkage, Init, Name);
|
||||
assertPrivateName(GV);
|
||||
if (Section)
|
||||
GV->setSection(Section);
|
||||
|
@ -5524,7 +5525,7 @@ AddModuleClassList(ArrayRef<llvm::GlobalValue*> Container,
|
|||
|
||||
llvm::GlobalVariable *GV =
|
||||
new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Init,
|
||||
SymbolName);
|
||||
assertPrivateName(GV);
|
||||
|
@ -5711,7 +5712,7 @@ llvm::GlobalVariable * CGObjCNonFragileABIMac::BuildClassRoTInitializer(
|
|||
Values);
|
||||
llvm::GlobalVariable *CLASS_RO_GV =
|
||||
new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassRonfABITy, false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Init,
|
||||
(flags & NonFragileABI_Class_Meta) ?
|
||||
std::string("\01l_OBJC_METACLASS_RO_$_")+ClassName :
|
||||
|
@ -6037,7 +6038,7 @@ void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
|
|||
llvm::GlobalVariable *GCATV
|
||||
= new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.CategorynfABITy,
|
||||
false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Init,
|
||||
ExtCatName);
|
||||
assertPrivateName(GCATV);
|
||||
|
@ -6100,7 +6101,7 @@ CGObjCNonFragileABIMac::EmitMethodList(Twine Name,
|
|||
|
||||
llvm::GlobalVariable *GV =
|
||||
new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
|
||||
llvm::GlobalValue::InternalLinkage, Init, Name);
|
||||
llvm::GlobalValue::PrivateLinkage, Init, Name);
|
||||
assertPrivateName(GV);
|
||||
GV->setAlignment(CGM.getDataLayout().getABITypeAlignment(Init->getType()));
|
||||
GV->setSection(Section);
|
||||
|
@ -6217,7 +6218,7 @@ llvm::Constant *CGObjCNonFragileABIMac::EmitIvarList(
|
|||
const char *Prefix = "\01l_OBJC_$_INSTANCE_VARIABLES_";
|
||||
llvm::GlobalVariable *GV =
|
||||
new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Init,
|
||||
Prefix + OID->getName());
|
||||
assertPrivateName(GV);
|
||||
|
@ -6428,7 +6429,7 @@ CGObjCNonFragileABIMac::EmitProtocolList(Twine Name,
|
|||
|
||||
llvm::Constant *Init = llvm::ConstantStruct::getAnon(Values);
|
||||
GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Init, Name);
|
||||
assertPrivateName(GV);
|
||||
GV->setSection("__DATA, __objc_const");
|
||||
|
@ -6673,7 +6674,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitClassRefFromId(CodeGenFunction &CGF,
|
|||
llvm::GlobalVariable *ClassGV = GetClassGlobal(ClassName, Weak);
|
||||
Entry =
|
||||
new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
|
||||
false, llvm::GlobalValue::InternalLinkage,
|
||||
false, llvm::GlobalValue::PrivateLinkage,
|
||||
ClassGV,
|
||||
"\01L_OBJC_CLASSLIST_REFERENCES_$_");
|
||||
Entry->setAlignment(
|
||||
|
@ -6707,7 +6708,7 @@ CGObjCNonFragileABIMac::EmitSuperClassRef(CodeGenFunction &CGF,
|
|||
llvm::GlobalVariable *ClassGV = GetClassGlobal(ClassName);
|
||||
Entry =
|
||||
new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
|
||||
false, llvm::GlobalValue::InternalLinkage,
|
||||
false, llvm::GlobalValue::PrivateLinkage,
|
||||
ClassGV,
|
||||
"\01L_OBJC_CLASSLIST_SUP_REFS_$_");
|
||||
Entry->setAlignment(
|
||||
|
@ -6732,7 +6733,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitMetaClassRef(CodeGenFunction &CGF,
|
|||
ID->getNameAsString());
|
||||
llvm::GlobalVariable *MetaClassGV = GetClassGlobal(MetaClassName);
|
||||
Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
|
||||
false, llvm::GlobalValue::InternalLinkage,
|
||||
false, llvm::GlobalValue::PrivateLinkage,
|
||||
MetaClassGV,
|
||||
"\01L_OBJC_CLASSLIST_SUP_REFS_$_");
|
||||
Entry->setAlignment(
|
||||
|
@ -6820,7 +6821,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitSelector(CodeGenFunction &CGF,
|
|||
ObjCTypes.SelectorPtrTy);
|
||||
Entry =
|
||||
new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.SelectorPtrTy, false,
|
||||
llvm::GlobalValue::InternalLinkage,
|
||||
llvm::GlobalValue::PrivateLinkage,
|
||||
Casted, "\01L_OBJC_SELECTOR_REFERENCES_");
|
||||
Entry->setExternallyInitialized(true);
|
||||
Entry->setSection("__DATA, __objc_selrefs, literal_pointers, no_dead_strip");
|
||||
|
|
|
@ -581,11 +581,11 @@ void test21(unsigned n) {
|
|||
// rdar://problem/12492434
|
||||
// Note that we set the flag saying that we need destruction *and*
|
||||
// the flag saying that we don't also need construction.
|
||||
// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test23" = internal global [[RO_T:%.*]] { i32 390,
|
||||
// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test23" = private global [[RO_T:%.*]] { i32 390,
|
||||
@interface Test23 { id x; } @end
|
||||
@implementation Test23 @end
|
||||
|
||||
// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test24" = internal global [[RO_T:%.*]] { i32 130,
|
||||
// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test24" = private global [[RO_T:%.*]] { i32 130,
|
||||
@interface Test24 {} @end
|
||||
@implementation Test24 @end
|
||||
|
||||
|
|
|
@ -53,18 +53,18 @@ typedef signed char BOOL;
|
|||
+ (id)stringWithUTF8String:(const char *)nullTerminatedCString;
|
||||
@end
|
||||
|
||||
// CHECK: [[WithIntMeth:@".*"]] = internal global [15 x i8] c"numberWithInt:\00"
|
||||
// CHECK: [[WithIntSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([15 x i8]* [[WithIntMeth]]
|
||||
// CHECK: [[WithCharMeth:@".*"]] = internal global [16 x i8] c"numberWithChar:\00"
|
||||
// CHECK: [[WithCharSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithCharMeth]]
|
||||
// CHECK: [[WithBoolMeth:@".*"]] = internal global [16 x i8] c"numberWithBool:\00"
|
||||
// CHECK: [[WithBoolSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithBoolMeth]]
|
||||
// CHECK: [[WithIntegerMeth:@".*"]] = internal global [19 x i8] c"numberWithInteger:\00"
|
||||
// CHECK: [[WithIntegerSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([19 x i8]* [[WithIntegerMeth]]
|
||||
// CHECK: [[WithUnsignedIntegerMeth:@".*"]] = internal global [27 x i8] c"numberWithUnsignedInteger:\00"
|
||||
// CHECK: [[WithUnsignedIntegerSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([27 x i8]* [[WithUnsignedIntegerMeth]]
|
||||
// CHECK: [[stringWithUTF8StringMeth:@".*"]] = internal global [22 x i8] c"stringWithUTF8String:\00"
|
||||
// CHECK: [[stringWithUTF8StringSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([22 x i8]* [[stringWithUTF8StringMeth]]
|
||||
// CHECK: [[WithIntMeth:@".*"]] = private global [15 x i8] c"numberWithInt:\00"
|
||||
// CHECK: [[WithIntSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([15 x i8]* [[WithIntMeth]]
|
||||
// CHECK: [[WithCharMeth:@".*"]] = private global [16 x i8] c"numberWithChar:\00"
|
||||
// CHECK: [[WithCharSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithCharMeth]]
|
||||
// CHECK: [[WithBoolMeth:@".*"]] = private global [16 x i8] c"numberWithBool:\00"
|
||||
// CHECK: [[WithBoolSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithBoolMeth]]
|
||||
// CHECK: [[WithIntegerMeth:@".*"]] = private global [19 x i8] c"numberWithInteger:\00"
|
||||
// CHECK: [[WithIntegerSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([19 x i8]* [[WithIntegerMeth]]
|
||||
// CHECK: [[WithUnsignedIntegerMeth:@".*"]] = private global [27 x i8] c"numberWithUnsignedInteger:\00"
|
||||
// CHECK: [[WithUnsignedIntegerSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([27 x i8]* [[WithUnsignedIntegerMeth]]
|
||||
// CHECK: [[stringWithUTF8StringMeth:@".*"]] = private global [22 x i8] c"stringWithUTF8String:\00"
|
||||
// CHECK: [[stringWithUTF8StringSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([22 x i8]* [[stringWithUTF8StringMeth]]
|
||||
|
||||
int main() {
|
||||
// CHECK: load i8** [[WithIntSEL]]
|
||||
|
|
|
@ -13,8 +13,8 @@ void f0(A *a) {
|
|||
a.y += a1;
|
||||
}
|
||||
|
||||
// CHECK-LP64: internal global [13 x i8] c"COMPLEX_PROP
|
||||
// CHECK-LP64: internal global [17 x i8] c"setCOMPLEX_PROP
|
||||
// CHECK-LP64: private global [13 x i8] c"COMPLEX_PROP
|
||||
// CHECK-LP64: private global [17 x i8] c"setCOMPLEX_PROP
|
||||
|
||||
// rdar: // 7351147
|
||||
@interface B
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
@implementation Foo
|
||||
- (id)test:(id )one, id two {return two; } @end
|
||||
|
||||
// CHECK-LP64: internal global [11 x i8] c"@24@0:8@16
|
||||
// CHECK-LP64: private global [11 x i8] c"@24@0:8@16
|
||||
|
|
|
@ -14,8 +14,8 @@ typedef struct {} Z;
|
|||
-(void)foo:(Z)a: (char*)b : (Z)c : (double) d {}
|
||||
@end
|
||||
|
||||
// CHECK: internal global [14 x i8] c"v16@0:8{?=}16
|
||||
// CHECK: internal global [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
|
||||
// CHECK: private global [14 x i8] c"v16@0:8{?=}16
|
||||
// CHECK: private global [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
|
||||
|
||||
|
||||
// rdar://13190095
|
||||
|
@ -34,7 +34,7 @@ typedef BABugExample BABugExampleRedefinition;
|
|||
@synthesize property = _property;
|
||||
@end
|
||||
|
||||
// CHECK: internal global [24 x i8] c"^{BABugExample=@}16
|
||||
// CHECK: private global [24 x i8] c"^{BABugExample=@}16
|
||||
|
||||
// rdar://14408244
|
||||
@class SCNCamera;
|
||||
|
@ -52,4 +52,4 @@ typedef struct
|
|||
C3DCameraStorage _storage;
|
||||
}
|
||||
@end
|
||||
// CHECK: internal global [39 x i8] c"{?=\22presentationInstance\22^{SCNCamera}}\00"
|
||||
// CHECK: private global [39 x i8] c"{?=\22presentationInstance\22^{SCNCamera}}\00"
|
||||
|
|
|
@ -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: @"\01L_OBJC_METH_VAR_TYPE_34" = internal global [16 x i8] c"v12@0:4[3[4@]]8\00"
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_TYPE_34" = private global [16 x i8] c"v12@0:4[3[4@]]8\00"
|
||||
|
||||
@class Int1;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s
|
||||
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = internal externally_initialized global
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = private externally_initialized global
|
||||
|
||||
void test(id x) {
|
||||
[x doSomething];
|
||||
|
|
|
@ -2,24 +2,24 @@
|
|||
|
||||
// CHECK: @"OBJC_IVAR_$_I3._iv2" = global i64 8, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: @"OBJC_IVAR_$_I3._iv3" = global i64 12, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I3" = internal global {{.*}} { i32 0, i32 8, i32 13
|
||||
// CHECK: _OBJC_CLASS_RO_$_I3" = private global {{.*}} { i32 0, i32 8, i32 13
|
||||
// CHECK: @"OBJC_IVAR_$_I4._iv4" = global i64 13, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I4" = internal global {{.*}} { i32 0, i32 13, i32 14, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I4" = private global {{.*}} { i32 0, i32 13, i32 14, {{.*}}
|
||||
// CHECK: @"OBJC_IVAR_$_I5._iv6_synth" = hidden global i64 16, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: @"OBJC_IVAR_$_I5._iv7_synth" = hidden global i64 20, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: @"OBJC_IVAR_$_I5._iv5" = global i64 14, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I5" = internal global {{.*}} { i32 0, i32 14, i32 24, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I5" = private global {{.*}} { i32 0, i32 14, i32 24, {{.*}}
|
||||
// CHECK: @"OBJC_IVAR_$_I6.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I6" = internal global {{.*}} { i32 2, i32 0, i32 1, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I6" = private global {{.*}} { i32 2, i32 0, i32 1, {{.*}}
|
||||
// CHECK: @"OBJC_IVAR_$_I8.b" = global i64 8, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I8" = internal global {{.*}} { i32 0, i32 8, i32 16, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I8" = private global {{.*}} { i32 0, i32 8, i32 16, {{.*}}
|
||||
// CHECK: @"OBJC_IVAR_$_I9.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I9" = internal global {{.*}} { i32 2, i32 0, i32 4, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I9" = private global {{.*}} { i32 2, i32 0, i32 4, {{.*}}
|
||||
// CHECK: @"OBJC_IVAR_$_I10.iv1" = global i64 4, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I10" = internal global {{.*}} { i32 0, i32 4, i32 5, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I11" = internal global {{.*}} { i32 0, i32 5, i32 5, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I10" = private global {{.*}} { i32 0, i32 4, i32 5, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I11" = private global {{.*}} { i32 0, i32 5, i32 5, {{.*}}
|
||||
// CHECK: @"OBJC_IVAR_$_I12.iv2" = global i64 8, section "__DATA, __objc_ivar", align 8
|
||||
// CHECK: _OBJC_CLASS_RO_$_I12" = internal global {{.*}} { i32 0, i32 8, i32 12, {{.*}}
|
||||
// CHECK: _OBJC_CLASS_RO_$_I12" = private global {{.*}} { i32 0, i32 8, i32 12, {{.*}}
|
||||
|
||||
/*
|
||||
Compare to:
|
||||
|
|
|
@ -33,9 +33,9 @@ __weak B *f2;
|
|||
@property int p3;
|
||||
@end
|
||||
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"C\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\11p\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"!`\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"C\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\11p\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"!`\00"
|
||||
|
||||
|
||||
@implementation C
|
||||
|
@ -48,9 +48,9 @@ __weak B *f2;
|
|||
@property (assign) __weak id p2;
|
||||
@end
|
||||
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"A\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\11q\10\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"!q\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"A\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\11q\10\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"!q\00"
|
||||
|
||||
@implementation A
|
||||
@synthesize p0 = _p0;
|
||||
|
@ -62,9 +62,9 @@ __weak B *f2;
|
|||
@property int p3;
|
||||
@end
|
||||
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"D\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\11p\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"!`\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"D\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\11p\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"!`\00"
|
||||
|
||||
@implementation D
|
||||
@synthesize p3 = _p3;
|
||||
|
@ -89,8 +89,8 @@ typedef unsigned int FSCatalogInfoBitmap;
|
|||
}
|
||||
@end
|
||||
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"NSFileLocationComponent\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\01\14\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"NSFileLocationComponent\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\01\14\00"
|
||||
|
||||
@implementation NSFileLocationComponent @end
|
||||
|
||||
|
@ -108,7 +108,7 @@ typedef unsigned int FSCatalogInfoBitmap;
|
|||
}
|
||||
@end
|
||||
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"Foo\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\02\10\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"Foo\00"
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\02\10\00"
|
||||
|
||||
@implementation Foo @end
|
||||
|
|
|
@ -2,31 +2,31 @@
|
|||
|
||||
// CHECK: .lazy_reference .objc_class_name_J0
|
||||
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_INSTANCE_METHODS_P" = internal global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_CLASS_METHODS_P" = internal global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_P" = internal global {{.*}}section "__OBJC,__protocol,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_A" = internal global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_METHODS_A" = internal global {{.*}}section "__OBJC,__cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_METACLASS_A" = internal global {{.*}}section "__OBJC,__meta_class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_INSTANCE_VARIABLES_A" = internal global {{.*}}section "__OBJC,__instance_vars,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_INSTANCE_METHODS_A" = internal global {{.*}}section "__OBJC,__inst_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01l_OBJC_$_PROP_LIST_A" = internal global {{.*}}section "__OBJC,__property,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASSEXT_A" = internal global {{.*}}section "__OBJC,__class_ext,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_A" = internal global {{.*}}section "__OBJC,__class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_INSTANCE_METHODS_A_Cat" = internal global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_CLASS_METHODS_A_Cat" = internal global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = internal global {{.*}}section "__OBJC,__category,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_REFERENCES_{{[0-9]*}}" = internal global {{.*}}section "__OBJC,__cls_refs,literal_pointers,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_{{[0-9]*}}" = internal externally_initialized global {{.*}}section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_SYMBOLS" = internal global {{.*}}section "__OBJC,__symbols,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_MODULES" = internal global {{.*}}section "__OBJC,__module_info,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_INSTANCE_METHODS_P" = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_CLASS_METHODS_P" = private global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_P" = private global {{.*}}section "__OBJC,__protocol,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_A" = private global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_METHODS_A" = private global {{.*}}section "__OBJC,__cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_METACLASS_A" = private global {{.*}}section "__OBJC,__meta_class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_INSTANCE_VARIABLES_A" = private global {{.*}}section "__OBJC,__instance_vars,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_INSTANCE_METHODS_A" = private global {{.*}}section "__OBJC,__inst_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = private global {{.*}}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: @"\01L_OBJC_CLASSEXT_A" = private global {{.*}}section "__OBJC,__class_ext,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_A" = private global {{.*}}section "__OBJC,__class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_INSTANCE_METHODS_A_Cat" = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_CLASS_METHODS_A_Cat" = private global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = private global {{.*}}section "__OBJC,__category,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_REFERENCES_{{[0-9]*}}" = private global {{.*}}section "__OBJC,__cls_refs,literal_pointers,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_{{[0-9]*}}" = private externally_initialized global {{.*}}section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_SYMBOLS" = private global {{.*}}section "__OBJC,__symbols,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_MODULES" = private global {{.*}}section "__OBJC,__module_info,regular,no_dead_strip", align 4
|
||||
|
||||
// Clang's Obj-C 32-bit doesn't emit ivars for the root class.
|
||||
// CHECKX: @"\01L_OBJC_CLASS_VARIABLES_A" = internal global {{.*}}section "__OBJC,__class_vars,regular,no_dead_strip", align 4
|
||||
// CHECKX: @"\01L_OBJC_CLASS_VARIABLES_A" = private global {{.*}}section "__OBJC,__class_vars,regular,no_dead_strip", align 4
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,32 +5,32 @@
|
|||
// CHECK: @_objc_empty_vtable = external global
|
||||
// CHECK: @"OBJC_CLASS_$_A" = global
|
||||
// CHECK: @"OBJC_METACLASS_$_A" = global {{.*}} section "__DATA, __objc_data", align 8
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__objc_classname,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__objc_methtype,cstring_literals", align 1
|
||||
// CHECK: @"\01l_OBJC_$_CLASS_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_PROTOCOL_CLASS_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = private global {{.*}} section "__TEXT,__objc_classname,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = private global {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
|
||||
// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = private global {{.*}} 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
|
||||
// CHECK: @"\01l_OBJC_PROTOCOL_$_P" = weak hidden global {{.*}} section "__DATA,__datacoal_nt,coalesced", align 8
|
||||
// CHECK: @"\01l_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global {{.*}} section "__DATA, __objc_protolist, coalesced, no_dead_strip", align 8
|
||||
// CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_METACLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_INSTANCE_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_INSTANCE_VARIABLES_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__cstring,cstring_literals", align 1
|
||||
// CHECK: @"\01l_OBJC_$_PROP_LIST_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_CLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_CATEGORY_INSTANCE_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_CATEGORY_CLASS_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_CATEGORY_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = internal externally_initialized global {{.*}} section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
|
||||
// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// 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: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = private global {{.*}} 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
|
||||
// CHECK: @"\01l_OBJC_$_CATEGORY_CLASS_METHODS_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01l_OBJC_$_CATEGORY_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
|
||||
// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = private global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = private externally_initialized global {{.*}} section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
|
||||
// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = private global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
|
||||
// CHECK: @"OBJC_CLASS_$_B" = external global
|
||||
// CHECK: @"\01L_OBJC_CLASSLIST_REFERENCES_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01L_OBJC_CLASSLIST_REFERENCES_$_{{[0-9]*}}" = private global {{.*}} section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01l_objc_msgSend_fixup_alloc" = weak hidden global {{.*}} section "__DATA, __objc_msgrefs, coalesced", align 16
|
||||
// CHECK: @"\01L_OBJC_LABEL_CLASS_$" = internal global {{.*}} section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01L_OBJC_LABEL_CATEGORY_$" = internal global {{.*}} section "__DATA, __objc_catlist, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}} section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
|
||||
// CHECK: @"\01L_OBJC_LABEL_CATEGORY_$" = private global {{.*}} section "__DATA, __objc_catlist, regular, no_dead_strip", align 8
|
||||
// CHECK: @objc_msgSend_fpret(
|
||||
// CHECK: @objc_msgSend_fixup(
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, section "__DATA,__datacoal_nt,coalesced", align 8
|
||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH2" = external global
|
||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 8
|
||||
// CHECK-X86_64: @"\01L_OBJC_LABEL_CLASS_$" = internal global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
|
||||
// CHECK-X86_64: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
|
||||
// CHECK-X86_64: define internal void @"\01-[A im0]"
|
||||
// CHECK-X86_64: define internal void @"\01-[A(Cat) im1]"
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, section "__DATA,__datacoal_nt,coalesced", align 4
|
||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH2" = external global
|
||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 4
|
||||
// CHECK-ARMV6: @"\01L_OBJC_LABEL_CLASS_$" = internal global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 4
|
||||
// CHECK-ARMV6: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 4
|
||||
// CHECK-ARMV6: define internal void @"\01-[A im0]"
|
||||
// CHECK-ARMV6: define internal void @"\01-[A(Cat) im1]"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s
|
||||
// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CLASS_$" = internal global \[1 x .*\] .*@"OBJC_CLASS_$_A".*, section "__DATA, __objc_nlclslist, regular, no_dead_strip", align 8' %t
|
||||
// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CATEGORY_$" = internal global \[1 x .*\] .*@".01l_OBJC_$_CATEGORY_A_$_Cat".*, section "__DATA, __objc_nlcatlist, regular, no_dead_strip", align 8' %t
|
||||
// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CLASS_$" = private global \[1 x .*\] .*@"OBJC_CLASS_$_A".*, section "__DATA, __objc_nlclslist, regular, no_dead_strip", align 8' %t
|
||||
// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CATEGORY_$" = private global \[1 x .*\] .*@".01l_OBJC_$_CATEGORY_A_$_Cat".*, section "__DATA, __objc_nlcatlist, regular, no_dead_strip", align 8' %t
|
||||
|
||||
@interface A @end
|
||||
@implementation A
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
// 32-bit
|
||||
|
||||
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
|
||||
// CHECK: @"\01L_OBJC_METACLASS_A" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_A" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = internal global {{.*}}, section "__OBJC,__category,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_P" = internal global {{.*}}, section "__OBJC,__protocol,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_C" = internal global {{.*}}, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_METACLASS_C" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_C" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_MODULES" = internal global {{.*}}, section "__OBJC,__module_info,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_METACLASS_A" = private global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_A" = private global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = private global {{.*}}, section "__OBJC,__category,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_PROTOCOL_P" = private global {{.*}}, section "__OBJC,__protocol,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_C" = private global {{.*}}, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_METACLASS_C" = private global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_CLASS_C" = private global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
|
||||
// CHECK: @"\01L_OBJC_MODULES" = private global {{.*}}, section "__OBJC,__module_info,regular,no_dead_strip", align 4
|
||||
|
||||
// 64-bit
|
||||
|
||||
|
@ -17,16 +17,16 @@
|
|||
// RUNX: grep '@"OBJC_CLASS_$_C" = global' %t &&
|
||||
// RUNX: grep '@"OBJC_METACLASS_$_A" = global' %t &&
|
||||
// RUNX: grep '@"OBJC_METACLASS_$_C" = global' %t &&
|
||||
// RUNX: grep '@"\\01L_OBJC_CLASSLIST_REFERENCES_$_0" = internal global .*, section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8' %t &&
|
||||
// RUNX: grep '@"\\01L_OBJC_LABEL_CATEGORY_$" = internal global .*, section "__DATA, __objc_catlist, regular, no_dead_strip", align 8' %t &&
|
||||
// RUNX: grep '@"\\01L_OBJC_LABEL_CLASS_$" = internal global .*, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_$_CATEGORY_A_$_Cat" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_CLASS_PROTOCOLS_$_C" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_A" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_C" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01L_OBJC_CLASSLIST_REFERENCES_$_0" = private global .*, section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8' %t &&
|
||||
// RUNX: grep '@"\\01L_OBJC_LABEL_CATEGORY_$" = private global .*, section "__DATA, __objc_catlist, regular, no_dead_strip", align 8' %t &&
|
||||
// RUNX: grep '@"\\01L_OBJC_LABEL_CLASS_$" = private global .*, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_$_CATEGORY_A_$_Cat" = private global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_CLASS_PROTOCOLS_$_C" = private global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_A" = private global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_C" = private global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global .*, section "__DATA, __objc_protolist, coalesced, no_dead_strip", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_A" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_C" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_A" = private global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_C" = private global .*, section "__DATA, __objc_const", align 8' %t &&
|
||||
// RUNX: grep '@"\\01l_OBJC_PROTOCOL_$_P" = weak hidden global .*, section "__DATA,__datacoal_nt,coalesced", align 8' %t &&
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
@end
|
||||
|
||||
|
||||
// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category" = internal global
|
||||
// CHECK: l_OBJC_$_CATEGORY_Foo_$_Category" = internal global
|
||||
// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category" = private global
|
||||
// CHECK: l_OBJC_$_CATEGORY_Foo_$_Category" = private global
|
||||
// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
|
||||
// CHECK: l_OBJC_$_PROP_LIST_C2" = internal global { i32, i32, [3 x %struct._prop_t] } { i32 16, i32 3
|
||||
// CHECK: l_OBJC_$_PROP_LIST_C2" = private global { i32, i32, [3 x %struct._prop_t] } { i32 16, i32 3
|
||||
|
||||
@protocol P
|
||||
@property int i;
|
||||
|
|
|
@ -38,21 +38,21 @@ typedef signed char BOOL;
|
|||
}
|
||||
@end
|
||||
|
||||
// CHECK: @"{{.*}}" = internal global [10 x i8] c"_boolean1
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean2
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean3
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean4
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean5
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean6
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean7
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean8
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean9
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object1
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object2
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object3
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object4
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object5
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object6
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object7
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object8
|
||||
// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object9
|
||||
// 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// CHECK: [[A:.*]] = type { i64, [10 x i8*] }
|
||||
|
||||
// CHECK: [[LAYOUT0:@.*]] = internal global [3 x i8] c" 9\00"
|
||||
// CHECK: [[LAYOUT0:@.*]] = private global [3 x i8] c" 9\00"
|
||||
|
||||
// rdar://13045269
|
||||
// If a __block variable requires extended layout information *and*
|
||||
|
|
|
@ -213,7 +213,7 @@ public:
|
|||
dynamic_class dynamic_class_ivar;
|
||||
}
|
||||
@end
|
||||
// CHECK: internal global [41 x i8] c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
|
||||
// CHECK: private global [41 x i8] c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
|
||||
|
||||
namespace PR17142 {
|
||||
struct A { virtual ~A(); };
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s
|
||||
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = internal externally_initialized global
|
||||
// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = private externally_initialized global
|
||||
|
||||
void test(id x) {
|
||||
[x doSomething];
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
typedef int (^fp)();
|
||||
fp f() { auto x = []{ return 3; }; return x; }
|
||||
|
||||
// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = internal global [5 x i8] c"copy\00"
|
||||
// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = internal global [12 x i8] c"autorelease\00"
|
||||
// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = private global [5 x i8] c"copy\00"
|
||||
// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = private global [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*)
|
||||
|
|
Loading…
Reference in New Issue