forked from OSchip/llvm-project
[CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make
private symbols in the __DATA segment internal. This prevents the linker from removing the symbol names. Keeping the symbols visible enables tools to collect various information about the symbols, for example, tools that discover whether or not a symbol gets dirtied. rdar://problem/48887111 Differential Revision: https://reviews.llvm.org/D61454 llvm-svn: 360359
This commit is contained in:
parent
4bf8632c45
commit
187770dc74
|
@ -1809,6 +1809,28 @@ static bool hasObjCExceptionAttribute(ASTContext &Context,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static llvm::GlobalValue::LinkageTypes
|
||||||
|
getLinkageTypeForObjCMetadata(CodeGenModule &CGM, StringRef Section) {
|
||||||
|
if (CGM.getTriple().isOSBinFormatMachO() &&
|
||||||
|
(Section.empty() || Section.startswith("__DATA")))
|
||||||
|
return llvm::GlobalValue::InternalLinkage;
|
||||||
|
return llvm::GlobalValue::PrivateLinkage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A helper function to create an internal or private global variable.
|
||||||
|
static llvm::GlobalVariable *
|
||||||
|
finishAndCreateGlobal(ConstantInitBuilder::StructBuilder &Builder,
|
||||||
|
const llvm::Twine &Name, CodeGenModule &CGM) {
|
||||||
|
std::string SectionName;
|
||||||
|
if (CGM.getTriple().isOSBinFormatMachO())
|
||||||
|
SectionName = "__DATA, __objc_const";
|
||||||
|
auto *GV = Builder.finishAndCreateGlobal(
|
||||||
|
Name, CGM.getPointerAlign(), /*constant*/ false,
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, SectionName));
|
||||||
|
GV->setSection(SectionName);
|
||||||
|
return GV;
|
||||||
|
}
|
||||||
|
|
||||||
/* *** CGObjCMac Public Interface *** */
|
/* *** CGObjCMac Public Interface *** */
|
||||||
|
|
||||||
CGObjCMac::CGObjCMac(CodeGen::CodeGenModule &cgm) : CGObjCCommonMac(cgm),
|
CGObjCMac::CGObjCMac(CodeGen::CodeGenModule &cgm) : CGObjCCommonMac(cgm),
|
||||||
|
@ -3105,7 +3127,7 @@ CGObjCMac::EmitProtocolExtension(const ObjCProtocolDecl *PD,
|
||||||
values.add(classProperties);
|
values.add(classProperties);
|
||||||
|
|
||||||
// No special section, but goes in llvm.used
|
// No special section, but goes in llvm.used
|
||||||
return CreateMetadataVar("\01l_OBJC_PROTOCOLEXT_" + PD->getName(), values,
|
return CreateMetadataVar("_OBJC_PROTOCOLEXT_" + PD->getName(), values,
|
||||||
StringRef(), CGM.getPointerAlign(), true);
|
StringRef(), CGM.getPointerAlign(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3338,9 +3360,9 @@ void CGObjCMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
|
||||||
|
|
||||||
// If there is no category @interface then there can be no properties.
|
// If there is no category @interface then there can be no properties.
|
||||||
if (Category) {
|
if (Category) {
|
||||||
Values.add(EmitPropertyList("\01l_OBJC_$_PROP_LIST_" + ExtName.str(),
|
Values.add(EmitPropertyList("_OBJC_$_PROP_LIST_" + ExtName.str(),
|
||||||
OCD, Category, ObjCTypes, false));
|
OCD, Category, ObjCTypes, false));
|
||||||
Values.add(EmitPropertyList("\01l_OBJC_$_CLASS_PROP_LIST_" + ExtName.str(),
|
Values.add(EmitPropertyList("_OBJC_$_CLASS_PROP_LIST_" + ExtName.str(),
|
||||||
OCD, Category, ObjCTypes, true));
|
OCD, Category, ObjCTypes, true));
|
||||||
} else {
|
} else {
|
||||||
Values.addNullPointer(ObjCTypes.PropertyListPtrTy);
|
Values.addNullPointer(ObjCTypes.PropertyListPtrTy);
|
||||||
|
@ -3686,8 +3708,8 @@ CGObjCMac::EmitClassExtension(const ObjCImplementationDecl *ID,
|
||||||
|
|
||||||
// Properties.
|
// Properties.
|
||||||
llvm::Constant *propertyList =
|
llvm::Constant *propertyList =
|
||||||
EmitPropertyList((isMetaclass ? Twine("\01l_OBJC_$_CLASS_PROP_LIST_")
|
EmitPropertyList((isMetaclass ? Twine("_OBJC_$_CLASS_PROP_LIST_")
|
||||||
: Twine("\01l_OBJC_$_PROP_LIST_"))
|
: Twine("_OBJC_$_PROP_LIST_"))
|
||||||
+ ID->getName(),
|
+ ID->getName(),
|
||||||
ID, ID->getClassInterface(), ObjCTypes, isMetaclass);
|
ID, ID->getClassInterface(), ObjCTypes, isMetaclass);
|
||||||
|
|
||||||
|
@ -3935,9 +3957,10 @@ llvm::GlobalVariable *CGObjCCommonMac::CreateMetadataVar(Twine Name,
|
||||||
StringRef Section,
|
StringRef Section,
|
||||||
CharUnits Align,
|
CharUnits Align,
|
||||||
bool AddToUsed) {
|
bool AddToUsed) {
|
||||||
|
llvm::GlobalValue::LinkageTypes LT =
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, Section);
|
||||||
llvm::GlobalVariable *GV =
|
llvm::GlobalVariable *GV =
|
||||||
Init.finishAndCreateGlobal(Name, Align, /*constant*/ false,
|
Init.finishAndCreateGlobal(Name, Align, /*constant*/ false, LT);
|
||||||
llvm::GlobalValue::PrivateLinkage);
|
|
||||||
if (!Section.empty())
|
if (!Section.empty())
|
||||||
GV->setSection(Section);
|
GV->setSection(Section);
|
||||||
if (AddToUsed)
|
if (AddToUsed)
|
||||||
|
@ -3951,9 +3974,10 @@ llvm::GlobalVariable *CGObjCCommonMac::CreateMetadataVar(Twine Name,
|
||||||
CharUnits Align,
|
CharUnits Align,
|
||||||
bool AddToUsed) {
|
bool AddToUsed) {
|
||||||
llvm::Type *Ty = Init->getType();
|
llvm::Type *Ty = Init->getType();
|
||||||
|
llvm::GlobalValue::LinkageTypes LT =
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, Section);
|
||||||
llvm::GlobalVariable *GV =
|
llvm::GlobalVariable *GV =
|
||||||
new llvm::GlobalVariable(CGM.getModule(), Ty, false,
|
new llvm::GlobalVariable(CGM.getModule(), Ty, false, LT, Init, Name);
|
||||||
llvm::GlobalValue::PrivateLinkage, Init, Name);
|
|
||||||
if (!Section.empty())
|
if (!Section.empty())
|
||||||
GV->setSection(Section);
|
GV->setSection(Section);
|
||||||
GV->setAlignment(Align.getQuantity());
|
GV->setAlignment(Align.getQuantity());
|
||||||
|
@ -6000,10 +6024,15 @@ void CGObjCNonFragileABIMac::AddModuleClassList(
|
||||||
Symbols.size()),
|
Symbols.size()),
|
||||||
Symbols);
|
Symbols);
|
||||||
|
|
||||||
|
// Section name is obtained by calling GetSectionName, which returns
|
||||||
|
// sections in the __DATA segment on MachO.
|
||||||
|
assert((!CGM.getTriple().isOSBinFormatMachO() ||
|
||||||
|
SectionName.startswith("__DATA")) &&
|
||||||
|
"SectionName expected to start with __DATA on MachO");
|
||||||
|
llvm::GlobalValue::LinkageTypes LT =
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, SectionName);
|
||||||
llvm::GlobalVariable *GV =
|
llvm::GlobalVariable *GV =
|
||||||
new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
|
new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false, LT, Init,
|
||||||
llvm::GlobalValue::PrivateLinkage,
|
|
||||||
Init,
|
|
||||||
SymbolName);
|
SymbolName);
|
||||||
GV->setAlignment(CGM.getDataLayout().getABITypeAlignment(Init->getType()));
|
GV->setAlignment(CGM.getDataLayout().getABITypeAlignment(Init->getType()));
|
||||||
GV->setSection(SectionName);
|
GV->setSection(SectionName);
|
||||||
|
@ -6182,7 +6211,7 @@ llvm::GlobalVariable * CGObjCNonFragileABIMac::BuildClassRoTInitializer(
|
||||||
|
|
||||||
const ObjCInterfaceDecl *OID = ID->getClassInterface();
|
const ObjCInterfaceDecl *OID = ID->getClassInterface();
|
||||||
assert(OID && "CGObjCNonFragileABIMac::BuildClassRoTInitializer");
|
assert(OID && "CGObjCNonFragileABIMac::BuildClassRoTInitializer");
|
||||||
values.add(EmitProtocolList("\01l_OBJC_CLASS_PROTOCOLS_$_"
|
values.add(EmitProtocolList("_OBJC_CLASS_PROTOCOLS_$_"
|
||||||
+ OID->getObjCRuntimeNameAsString(),
|
+ OID->getObjCRuntimeNameAsString(),
|
||||||
OID->all_referenced_protocol_begin(),
|
OID->all_referenced_protocol_begin(),
|
||||||
OID->all_referenced_protocol_end()));
|
OID->all_referenced_protocol_end()));
|
||||||
|
@ -6191,29 +6220,23 @@ llvm::GlobalVariable * CGObjCNonFragileABIMac::BuildClassRoTInitializer(
|
||||||
values.addNullPointer(ObjCTypes.IvarListnfABIPtrTy);
|
values.addNullPointer(ObjCTypes.IvarListnfABIPtrTy);
|
||||||
values.add(GetIvarLayoutName(nullptr, ObjCTypes));
|
values.add(GetIvarLayoutName(nullptr, ObjCTypes));
|
||||||
values.add(EmitPropertyList(
|
values.add(EmitPropertyList(
|
||||||
"\01l_OBJC_$_CLASS_PROP_LIST_" + ID->getObjCRuntimeNameAsString(),
|
"_OBJC_$_CLASS_PROP_LIST_" + ID->getObjCRuntimeNameAsString(),
|
||||||
ID, ID->getClassInterface(), ObjCTypes, true));
|
ID, ID->getClassInterface(), ObjCTypes, true));
|
||||||
} else {
|
} else {
|
||||||
values.add(EmitIvarList(ID));
|
values.add(EmitIvarList(ID));
|
||||||
values.add(BuildWeakIvarLayout(ID, beginInstance, endInstance, hasMRCWeak));
|
values.add(BuildWeakIvarLayout(ID, beginInstance, endInstance, hasMRCWeak));
|
||||||
values.add(EmitPropertyList(
|
values.add(EmitPropertyList(
|
||||||
"\01l_OBJC_$_PROP_LIST_" + ID->getObjCRuntimeNameAsString(),
|
"_OBJC_$_PROP_LIST_" + ID->getObjCRuntimeNameAsString(),
|
||||||
ID, ID->getClassInterface(), ObjCTypes, false));
|
ID, ID->getClassInterface(), ObjCTypes, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::SmallString<64> roLabel;
|
llvm::SmallString<64> roLabel;
|
||||||
llvm::raw_svector_ostream(roLabel)
|
llvm::raw_svector_ostream(roLabel)
|
||||||
<< ((flags & NonFragileABI_Class_Meta) ? "\01l_OBJC_METACLASS_RO_$_"
|
<< ((flags & NonFragileABI_Class_Meta) ? "_OBJC_METACLASS_RO_$_"
|
||||||
: "\01l_OBJC_CLASS_RO_$_")
|
: "_OBJC_CLASS_RO_$_")
|
||||||
<< ClassName;
|
<< ClassName;
|
||||||
|
|
||||||
llvm::GlobalVariable *CLASS_RO_GV =
|
return finishAndCreateGlobal(values, roLabel, CGM);
|
||||||
values.finishAndCreateGlobal(roLabel, CGM.getPointerAlign(),
|
|
||||||
/*constant*/ false,
|
|
||||||
llvm::GlobalValue::PrivateLinkage);
|
|
||||||
if (CGM.getTriple().isOSBinFormatMachO())
|
|
||||||
CLASS_RO_GV->setSection("__DATA, __objc_const");
|
|
||||||
return CLASS_RO_GV;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build the metaclass object for a class.
|
/// Build the metaclass object for a class.
|
||||||
|
@ -6445,7 +6468,7 @@ llvm::Value *CGObjCNonFragileABIMac::GenerateProtocolRef(CodeGenFunction &CGF,
|
||||||
llvm::ConstantExpr::getBitCast(GetOrEmitProtocol(PD),
|
llvm::ConstantExpr::getBitCast(GetOrEmitProtocol(PD),
|
||||||
ObjCTypes.getExternalProtocolPtrTy());
|
ObjCTypes.getExternalProtocolPtrTy());
|
||||||
|
|
||||||
std::string ProtocolName("\01l_OBJC_PROTOCOL_REFERENCE_$_");
|
std::string ProtocolName("_OBJC_PROTOCOL_REFERENCE_$_");
|
||||||
ProtocolName += PD->getObjCRuntimeNameAsString();
|
ProtocolName += PD->getObjCRuntimeNameAsString();
|
||||||
|
|
||||||
CharUnits Align = CGF.getPointerAlign();
|
CharUnits Align = CGF.getPointerAlign();
|
||||||
|
@ -6480,7 +6503,7 @@ llvm::Value *CGObjCNonFragileABIMac::GenerateProtocolRef(CodeGenFunction &CGF,
|
||||||
///
|
///
|
||||||
void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
|
void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
|
||||||
const ObjCInterfaceDecl *Interface = OCD->getClassInterface();
|
const ObjCInterfaceDecl *Interface = OCD->getClassInterface();
|
||||||
const char *Prefix = "\01l_OBJC_$_CATEGORY_";
|
const char *Prefix = "_OBJC_$_CATEGORY_";
|
||||||
|
|
||||||
llvm::SmallString<64> ExtCatName(Prefix);
|
llvm::SmallString<64> ExtCatName(Prefix);
|
||||||
ExtCatName += Interface->getObjCRuntimeNameAsString();
|
ExtCatName += Interface->getObjCRuntimeNameAsString();
|
||||||
|
@ -6516,14 +6539,14 @@ void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
|
||||||
SmallString<256> ExtName;
|
SmallString<256> ExtName;
|
||||||
llvm::raw_svector_ostream(ExtName) << Interface->getObjCRuntimeNameAsString() << "_$_"
|
llvm::raw_svector_ostream(ExtName) << Interface->getObjCRuntimeNameAsString() << "_$_"
|
||||||
<< OCD->getName();
|
<< OCD->getName();
|
||||||
values.add(EmitProtocolList("\01l_OBJC_CATEGORY_PROTOCOLS_$_"
|
values.add(EmitProtocolList("_OBJC_CATEGORY_PROTOCOLS_$_"
|
||||||
+ Interface->getObjCRuntimeNameAsString() + "_$_"
|
+ Interface->getObjCRuntimeNameAsString() + "_$_"
|
||||||
+ Category->getName(),
|
+ Category->getName(),
|
||||||
Category->protocol_begin(),
|
Category->protocol_begin(),
|
||||||
Category->protocol_end()));
|
Category->protocol_end()));
|
||||||
values.add(EmitPropertyList("\01l_OBJC_$_PROP_LIST_" + ExtName.str(),
|
values.add(EmitPropertyList("_OBJC_$_PROP_LIST_" + ExtName.str(),
|
||||||
OCD, Category, ObjCTypes, false));
|
OCD, Category, ObjCTypes, false));
|
||||||
values.add(EmitPropertyList("\01l_OBJC_$_CLASS_PROP_LIST_" + ExtName.str(),
|
values.add(EmitPropertyList("_OBJC_$_CLASS_PROP_LIST_" + ExtName.str(),
|
||||||
OCD, Category, ObjCTypes, true));
|
OCD, Category, ObjCTypes, true));
|
||||||
} else {
|
} else {
|
||||||
values.addNullPointer(ObjCTypes.ProtocolListnfABIPtrTy);
|
values.addNullPointer(ObjCTypes.ProtocolListnfABIPtrTy);
|
||||||
|
@ -6535,11 +6558,7 @@ void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
|
||||||
values.addInt(ObjCTypes.IntTy, Size);
|
values.addInt(ObjCTypes.IntTy, Size);
|
||||||
|
|
||||||
llvm::GlobalVariable *GCATV =
|
llvm::GlobalVariable *GCATV =
|
||||||
values.finishAndCreateGlobal(ExtCatName.str(), CGM.getPointerAlign(),
|
finishAndCreateGlobal(values, ExtCatName.str(), CGM);
|
||||||
/*constant*/ false,
|
|
||||||
llvm::GlobalValue::PrivateLinkage);
|
|
||||||
if (CGM.getTriple().isOSBinFormatMachO())
|
|
||||||
GCATV->setSection("__DATA, __objc_const");
|
|
||||||
CGM.addCompilerUsedGlobal(GCATV);
|
CGM.addCompilerUsedGlobal(GCATV);
|
||||||
DefinedCategories.push_back(GCATV);
|
DefinedCategories.push_back(GCATV);
|
||||||
|
|
||||||
|
@ -6598,36 +6617,36 @@ CGObjCNonFragileABIMac::emitMethodList(Twine name, MethodListType kind,
|
||||||
bool forProtocol;
|
bool forProtocol;
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case MethodListType::CategoryInstanceMethods:
|
case MethodListType::CategoryInstanceMethods:
|
||||||
prefix = "\01l_OBJC_$_CATEGORY_INSTANCE_METHODS_";
|
prefix = "_OBJC_$_CATEGORY_INSTANCE_METHODS_";
|
||||||
forProtocol = false;
|
forProtocol = false;
|
||||||
break;
|
break;
|
||||||
case MethodListType::CategoryClassMethods:
|
case MethodListType::CategoryClassMethods:
|
||||||
prefix = "\01l_OBJC_$_CATEGORY_CLASS_METHODS_";
|
prefix = "_OBJC_$_CATEGORY_CLASS_METHODS_";
|
||||||
forProtocol = false;
|
forProtocol = false;
|
||||||
break;
|
break;
|
||||||
case MethodListType::InstanceMethods:
|
case MethodListType::InstanceMethods:
|
||||||
prefix = "\01l_OBJC_$_INSTANCE_METHODS_";
|
prefix = "_OBJC_$_INSTANCE_METHODS_";
|
||||||
forProtocol = false;
|
forProtocol = false;
|
||||||
break;
|
break;
|
||||||
case MethodListType::ClassMethods:
|
case MethodListType::ClassMethods:
|
||||||
prefix = "\01l_OBJC_$_CLASS_METHODS_";
|
prefix = "_OBJC_$_CLASS_METHODS_";
|
||||||
forProtocol = false;
|
forProtocol = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MethodListType::ProtocolInstanceMethods:
|
case MethodListType::ProtocolInstanceMethods:
|
||||||
prefix = "\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_";
|
prefix = "_OBJC_$_PROTOCOL_INSTANCE_METHODS_";
|
||||||
forProtocol = true;
|
forProtocol = true;
|
||||||
break;
|
break;
|
||||||
case MethodListType::ProtocolClassMethods:
|
case MethodListType::ProtocolClassMethods:
|
||||||
prefix = "\01l_OBJC_$_PROTOCOL_CLASS_METHODS_";
|
prefix = "_OBJC_$_PROTOCOL_CLASS_METHODS_";
|
||||||
forProtocol = true;
|
forProtocol = true;
|
||||||
break;
|
break;
|
||||||
case MethodListType::OptionalProtocolInstanceMethods:
|
case MethodListType::OptionalProtocolInstanceMethods:
|
||||||
prefix = "\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_OPT_";
|
prefix = "_OBJC_$_PROTOCOL_INSTANCE_METHODS_OPT_";
|
||||||
forProtocol = true;
|
forProtocol = true;
|
||||||
break;
|
break;
|
||||||
case MethodListType::OptionalProtocolClassMethods:
|
case MethodListType::OptionalProtocolClassMethods:
|
||||||
prefix = "\01l_OBJC_$_PROTOCOL_CLASS_METHODS_OPT_";
|
prefix = "_OBJC_$_PROTOCOL_CLASS_METHODS_OPT_";
|
||||||
forProtocol = true;
|
forProtocol = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -6646,11 +6665,7 @@ CGObjCNonFragileABIMac::emitMethodList(Twine name, MethodListType kind,
|
||||||
}
|
}
|
||||||
methodArray.finishAndAddTo(values);
|
methodArray.finishAndAddTo(values);
|
||||||
|
|
||||||
auto *GV = values.finishAndCreateGlobal(prefix + name, CGM.getPointerAlign(),
|
llvm::GlobalVariable *GV = finishAndCreateGlobal(values, prefix + name, CGM);
|
||||||
/*constant*/ false,
|
|
||||||
llvm::GlobalValue::PrivateLinkage);
|
|
||||||
if (CGM.getTriple().isOSBinFormatMachO())
|
|
||||||
GV->setSection("__DATA, __objc_const");
|
|
||||||
CGM.addCompilerUsedGlobal(GV);
|
CGM.addCompilerUsedGlobal(GV);
|
||||||
return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.MethodListnfABIPtrTy);
|
return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.MethodListnfABIPtrTy);
|
||||||
}
|
}
|
||||||
|
@ -6790,13 +6805,9 @@ llvm::Constant *CGObjCNonFragileABIMac::EmitIvarList(
|
||||||
ivars.finishAndAddTo(ivarList);
|
ivars.finishAndAddTo(ivarList);
|
||||||
ivarList.fillPlaceholderWithInt(ivarCountSlot, ObjCTypes.IntTy, ivarCount);
|
ivarList.fillPlaceholderWithInt(ivarCountSlot, ObjCTypes.IntTy, ivarCount);
|
||||||
|
|
||||||
const char *Prefix = "\01l_OBJC_$_INSTANCE_VARIABLES_";
|
const char *Prefix = "_OBJC_$_INSTANCE_VARIABLES_";
|
||||||
llvm::GlobalVariable *GV =
|
llvm::GlobalVariable *GV = finishAndCreateGlobal(
|
||||||
ivarList.finishAndCreateGlobal(Prefix + OID->getObjCRuntimeNameAsString(),
|
ivarList, Prefix + OID->getObjCRuntimeNameAsString(), CGM);
|
||||||
CGM.getPointerAlign(), /*constant*/ false,
|
|
||||||
llvm::GlobalValue::PrivateLinkage);
|
|
||||||
if (CGM.getTriple().isOSBinFormatMachO())
|
|
||||||
GV->setSection("__DATA, __objc_const");
|
|
||||||
CGM.addCompilerUsedGlobal(GV);
|
CGM.addCompilerUsedGlobal(GV);
|
||||||
return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.IvarListnfABIPtrTy);
|
return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.IvarListnfABIPtrTy);
|
||||||
}
|
}
|
||||||
|
@ -6864,7 +6875,7 @@ llvm::Constant *CGObjCNonFragileABIMac::GetOrEmitProtocol(
|
||||||
// isa is NULL
|
// isa is NULL
|
||||||
values.addNullPointer(ObjCTypes.ObjectPtrTy);
|
values.addNullPointer(ObjCTypes.ObjectPtrTy);
|
||||||
values.add(GetClassName(PD->getObjCRuntimeNameAsString()));
|
values.add(GetClassName(PD->getObjCRuntimeNameAsString()));
|
||||||
values.add(EmitProtocolList("\01l_OBJC_$_PROTOCOL_REFS_"
|
values.add(EmitProtocolList("_OBJC_$_PROTOCOL_REFS_"
|
||||||
+ PD->getObjCRuntimeNameAsString(),
|
+ PD->getObjCRuntimeNameAsString(),
|
||||||
PD->protocol_begin(),
|
PD->protocol_begin(),
|
||||||
PD->protocol_end()));
|
PD->protocol_end()));
|
||||||
|
@ -6877,13 +6888,13 @@ llvm::Constant *CGObjCNonFragileABIMac::GetOrEmitProtocol(
|
||||||
values.add(methodLists.emitMethodList(this, PD,
|
values.add(methodLists.emitMethodList(this, PD,
|
||||||
ProtocolMethodLists::OptionalClassMethods));
|
ProtocolMethodLists::OptionalClassMethods));
|
||||||
values.add(EmitPropertyList(
|
values.add(EmitPropertyList(
|
||||||
"\01l_OBJC_$_PROP_LIST_" + PD->getObjCRuntimeNameAsString(),
|
"_OBJC_$_PROP_LIST_" + PD->getObjCRuntimeNameAsString(),
|
||||||
nullptr, PD, ObjCTypes, false));
|
nullptr, PD, ObjCTypes, false));
|
||||||
uint32_t Size =
|
uint32_t Size =
|
||||||
CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ProtocolnfABITy);
|
CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ProtocolnfABITy);
|
||||||
values.addInt(ObjCTypes.IntTy, Size);
|
values.addInt(ObjCTypes.IntTy, Size);
|
||||||
values.addInt(ObjCTypes.IntTy, 0);
|
values.addInt(ObjCTypes.IntTy, 0);
|
||||||
values.add(EmitProtocolMethodTypes("\01l_OBJC_$_PROTOCOL_METHOD_TYPES_"
|
values.add(EmitProtocolMethodTypes("_OBJC_$_PROTOCOL_METHOD_TYPES_"
|
||||||
+ PD->getObjCRuntimeNameAsString(),
|
+ PD->getObjCRuntimeNameAsString(),
|
||||||
methodLists.emitExtendedTypesArray(this),
|
methodLists.emitExtendedTypesArray(this),
|
||||||
ObjCTypes));
|
ObjCTypes));
|
||||||
|
@ -6892,7 +6903,7 @@ llvm::Constant *CGObjCNonFragileABIMac::GetOrEmitProtocol(
|
||||||
values.addNullPointer(ObjCTypes.Int8PtrTy);
|
values.addNullPointer(ObjCTypes.Int8PtrTy);
|
||||||
|
|
||||||
values.add(EmitPropertyList(
|
values.add(EmitPropertyList(
|
||||||
"\01l_OBJC_$_CLASS_PROP_LIST_" + PD->getObjCRuntimeNameAsString(),
|
"_OBJC_$_CLASS_PROP_LIST_" + PD->getObjCRuntimeNameAsString(),
|
||||||
nullptr, PD, ObjCTypes, true));
|
nullptr, PD, ObjCTypes, true));
|
||||||
|
|
||||||
if (Entry) {
|
if (Entry) {
|
||||||
|
@ -6976,11 +6987,7 @@ CGObjCNonFragileABIMac::EmitProtocolList(Twine Name,
|
||||||
array.finishAndAddTo(values);
|
array.finishAndAddTo(values);
|
||||||
values.fillPlaceholderWithInt(countSlot, ObjCTypes.LongTy, count);
|
values.fillPlaceholderWithInt(countSlot, ObjCTypes.LongTy, count);
|
||||||
|
|
||||||
GV = values.finishAndCreateGlobal(Name, CGM.getPointerAlign(),
|
GV = finishAndCreateGlobal(values, Name, CGM);
|
||||||
/*constant*/ false,
|
|
||||||
llvm::GlobalValue::PrivateLinkage);
|
|
||||||
if (CGM.getTriple().isOSBinFormatMachO())
|
|
||||||
GV->setSection("__DATA, __objc_const");
|
|
||||||
CGM.addCompilerUsedGlobal(GV);
|
CGM.addCompilerUsedGlobal(GV);
|
||||||
return llvm::ConstantExpr::getBitCast(GV,
|
return llvm::ConstantExpr::getBitCast(GV,
|
||||||
ObjCTypes.ProtocolListnfABIPtrTy);
|
ObjCTypes.ProtocolListnfABIPtrTy);
|
||||||
|
@ -7091,7 +7098,7 @@ CGObjCNonFragileABIMac::EmitVTableMessageSend(CodeGenFunction &CGF,
|
||||||
// except normal, non-super message-sends.
|
// except normal, non-super message-sends.
|
||||||
// FIXME: don't use this for that.
|
// FIXME: don't use this for that.
|
||||||
llvm::FunctionCallee fn = nullptr;
|
llvm::FunctionCallee fn = nullptr;
|
||||||
std::string messageRefName("\01l_");
|
std::string messageRefName("_");
|
||||||
if (CGM.ReturnSlotInterferesWithArgs(MSI.CallInfo)) {
|
if (CGM.ReturnSlotInterferesWithArgs(MSI.CallInfo)) {
|
||||||
if (isSuper) {
|
if (isSuper) {
|
||||||
fn = ObjCTypes.getMessageSendSuper2StretFixupFn();
|
fn = ObjCTypes.getMessageSendSuper2StretFixupFn();
|
||||||
|
@ -7245,12 +7252,14 @@ CGObjCNonFragileABIMac::EmitClassRefFromId(CodeGenFunction &CGF,
|
||||||
NotForDefinition);
|
NotForDefinition);
|
||||||
}
|
}
|
||||||
|
|
||||||
Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
|
std::string SectionName =
|
||||||
false, llvm::GlobalValue::PrivateLinkage,
|
GetSectionName("__objc_classrefs", "regular,no_dead_strip");
|
||||||
ClassGV, "OBJC_CLASSLIST_REFERENCES_$_");
|
Entry = new llvm::GlobalVariable(
|
||||||
|
CGM.getModule(), ObjCTypes.ClassnfABIPtrTy, false,
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, SectionName), ClassGV,
|
||||||
|
"OBJC_CLASSLIST_REFERENCES_$_");
|
||||||
Entry->setAlignment(Align.getQuantity());
|
Entry->setAlignment(Align.getQuantity());
|
||||||
Entry->setSection(GetSectionName("__objc_classrefs",
|
Entry->setSection(SectionName);
|
||||||
"regular,no_dead_strip"));
|
|
||||||
CGM.addCompilerUsedGlobal(Entry);
|
CGM.addCompilerUsedGlobal(Entry);
|
||||||
}
|
}
|
||||||
return CGF.Builder.CreateAlignedLoad(Entry, Align);
|
return CGF.Builder.CreateAlignedLoad(Entry, Align);
|
||||||
|
@ -7280,12 +7289,14 @@ CGObjCNonFragileABIMac::EmitSuperClassRef(CodeGenFunction &CGF,
|
||||||
|
|
||||||
if (!Entry) {
|
if (!Entry) {
|
||||||
auto ClassGV = GetClassGlobal(ID, /*metaclass*/ false, NotForDefinition);
|
auto ClassGV = GetClassGlobal(ID, /*metaclass*/ false, NotForDefinition);
|
||||||
Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
|
std::string SectionName =
|
||||||
false, llvm::GlobalValue::PrivateLinkage,
|
GetSectionName("__objc_superrefs", "regular,no_dead_strip");
|
||||||
ClassGV, "OBJC_CLASSLIST_SUP_REFS_$_");
|
Entry = new llvm::GlobalVariable(
|
||||||
|
CGM.getModule(), ObjCTypes.ClassnfABIPtrTy, false,
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, SectionName), ClassGV,
|
||||||
|
"OBJC_CLASSLIST_SUP_REFS_$_");
|
||||||
Entry->setAlignment(Align.getQuantity());
|
Entry->setAlignment(Align.getQuantity());
|
||||||
Entry->setSection(GetSectionName("__objc_superrefs",
|
Entry->setSection(SectionName);
|
||||||
"regular,no_dead_strip"));
|
|
||||||
CGM.addCompilerUsedGlobal(Entry);
|
CGM.addCompilerUsedGlobal(Entry);
|
||||||
}
|
}
|
||||||
return CGF.Builder.CreateAlignedLoad(Entry, Align);
|
return CGF.Builder.CreateAlignedLoad(Entry, Align);
|
||||||
|
@ -7301,14 +7312,14 @@ llvm::Value *CGObjCNonFragileABIMac::EmitMetaClassRef(CodeGenFunction &CGF,
|
||||||
llvm::GlobalVariable * &Entry = MetaClassReferences[ID->getIdentifier()];
|
llvm::GlobalVariable * &Entry = MetaClassReferences[ID->getIdentifier()];
|
||||||
if (!Entry) {
|
if (!Entry) {
|
||||||
auto MetaClassGV = GetClassGlobal(ID, /*metaclass*/ true, NotForDefinition);
|
auto MetaClassGV = GetClassGlobal(ID, /*metaclass*/ true, NotForDefinition);
|
||||||
|
std::string SectionName =
|
||||||
Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
|
GetSectionName("__objc_superrefs", "regular,no_dead_strip");
|
||||||
false, llvm::GlobalValue::PrivateLinkage,
|
Entry = new llvm::GlobalVariable(
|
||||||
MetaClassGV, "OBJC_CLASSLIST_SUP_REFS_$_");
|
CGM.getModule(), ObjCTypes.ClassnfABIPtrTy, false,
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, SectionName), MetaClassGV,
|
||||||
|
"OBJC_CLASSLIST_SUP_REFS_$_");
|
||||||
Entry->setAlignment(Align.getQuantity());
|
Entry->setAlignment(Align.getQuantity());
|
||||||
|
Entry->setSection(SectionName);
|
||||||
Entry->setSection(GetSectionName("__objc_superrefs",
|
|
||||||
"regular,no_dead_strip"));
|
|
||||||
CGM.addCompilerUsedGlobal(Entry);
|
CGM.addCompilerUsedGlobal(Entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7398,12 +7409,14 @@ Address CGObjCNonFragileABIMac::EmitSelectorAddr(CodeGenFunction &CGF,
|
||||||
llvm::Constant *Casted =
|
llvm::Constant *Casted =
|
||||||
llvm::ConstantExpr::getBitCast(GetMethodVarName(Sel),
|
llvm::ConstantExpr::getBitCast(GetMethodVarName(Sel),
|
||||||
ObjCTypes.SelectorPtrTy);
|
ObjCTypes.SelectorPtrTy);
|
||||||
Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.SelectorPtrTy,
|
std::string SectionName =
|
||||||
false, llvm::GlobalValue::PrivateLinkage,
|
GetSectionName("__objc_selrefs", "literal_pointers,no_dead_strip");
|
||||||
Casted, "OBJC_SELECTOR_REFERENCES_");
|
Entry = new llvm::GlobalVariable(
|
||||||
|
CGM.getModule(), ObjCTypes.SelectorPtrTy, false,
|
||||||
|
getLinkageTypeForObjCMetadata(CGM, SectionName), Casted,
|
||||||
|
"OBJC_SELECTOR_REFERENCES_");
|
||||||
Entry->setExternallyInitialized(true);
|
Entry->setExternallyInitialized(true);
|
||||||
Entry->setSection(GetSectionName("__objc_selrefs",
|
Entry->setSection(SectionName);
|
||||||
"literal_pointers,no_dead_strip"));
|
|
||||||
Entry->setAlignment(Align.getQuantity());
|
Entry->setAlignment(Align.getQuantity());
|
||||||
CGM.addCompilerUsedGlobal(Entry);
|
CGM.addCompilerUsedGlobal(Entry);
|
||||||
}
|
}
|
||||||
|
|
|
@ -634,11 +634,11 @@ void test21(unsigned n) {
|
||||||
// rdar://problem/12492434
|
// rdar://problem/12492434
|
||||||
// Note that we set the flag saying that we need destruction *and*
|
// Note that we set the flag saying that we need destruction *and*
|
||||||
// the flag saying that we don't also need construction.
|
// the flag saying that we don't also need construction.
|
||||||
// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test23" = private global [[RO_T:%.*]] { i32 390,
|
// CHECK-GLOBALS: @"_OBJC_CLASS_RO_$_Test23" = internal global [[RO_T:%.*]] { i32 390,
|
||||||
@interface Test23 { id x; } @end
|
@interface Test23 { id x; } @end
|
||||||
@implementation Test23 @end
|
@implementation Test23 @end
|
||||||
|
|
||||||
// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test24" = private global [[RO_T:%.*]] { i32 130,
|
// CHECK-GLOBALS: @"_OBJC_CLASS_RO_$_Test24" = internal global [[RO_T:%.*]] { i32 130,
|
||||||
@interface Test24 {} @end
|
@interface Test24 {} @end
|
||||||
@implementation Test24 @end
|
@implementation Test24 @end
|
||||||
|
|
||||||
|
|
|
@ -57,17 +57,17 @@ typedef signed char BOOL;
|
||||||
// CHECK: [[STRUCT_NSCONSTANT_STRING_TAG:%.*]] = type { i32*, i32, i8*, i64 }
|
// CHECK: [[STRUCT_NSCONSTANT_STRING_TAG:%.*]] = type { i32*, i32, i8*, i64 }
|
||||||
|
|
||||||
// CHECK: [[WithIntMeth:@.*]] = private unnamed_addr constant [15 x i8] c"numberWithInt:\00"
|
// CHECK: [[WithIntMeth:@.*]] = private unnamed_addr constant [15 x i8] c"numberWithInt:\00"
|
||||||
// CHECK: [[WithIntSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([15 x i8], [15 x i8]* [[WithIntMeth]]
|
// CHECK: [[WithIntSEL:@.*]] = internal externally_initialized global i8* getelementptr inbounds ([15 x i8], [15 x i8]* [[WithIntMeth]]
|
||||||
// CHECK: [[WithCharMeth:@.*]] = private unnamed_addr constant [16 x i8] c"numberWithChar:\00"
|
// CHECK: [[WithCharMeth:@.*]] = private unnamed_addr constant [16 x i8] c"numberWithChar:\00"
|
||||||
// CHECK: [[WithCharSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([16 x i8], [16 x i8]* [[WithCharMeth]]
|
// CHECK: [[WithCharSEL:@.*]] = internal externally_initialized global i8* getelementptr inbounds ([16 x i8], [16 x i8]* [[WithCharMeth]]
|
||||||
// CHECK: [[WithBoolMeth:@.*]] = private unnamed_addr constant [16 x i8] c"numberWithBool:\00"
|
// CHECK: [[WithBoolMeth:@.*]] = private unnamed_addr constant [16 x i8] c"numberWithBool:\00"
|
||||||
// CHECK: [[WithBoolSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([16 x i8], [16 x i8]* [[WithBoolMeth]]
|
// CHECK: [[WithBoolSEL:@.*]] = internal externally_initialized global i8* getelementptr inbounds ([16 x i8], [16 x i8]* [[WithBoolMeth]]
|
||||||
// CHECK: [[WithIntegerMeth:@.*]] = private unnamed_addr constant [19 x i8] c"numberWithInteger:\00"
|
// CHECK: [[WithIntegerMeth:@.*]] = private unnamed_addr constant [19 x i8] c"numberWithInteger:\00"
|
||||||
// CHECK: [[WithIntegerSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([19 x i8], [19 x i8]* [[WithIntegerMeth]]
|
// CHECK: [[WithIntegerSEL:@.*]] = internal externally_initialized global i8* getelementptr inbounds ([19 x i8], [19 x i8]* [[WithIntegerMeth]]
|
||||||
// CHECK: [[WithUnsignedIntegerMeth:@.*]] = private unnamed_addr constant [27 x i8] c"numberWithUnsignedInteger:\00"
|
// CHECK: [[WithUnsignedIntegerMeth:@.*]] = private unnamed_addr constant [27 x i8] c"numberWithUnsignedInteger:\00"
|
||||||
// CHECK: [[WithUnsignedIntegerSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([27 x i8], [27 x i8]* [[WithUnsignedIntegerMeth]]
|
// CHECK: [[WithUnsignedIntegerSEL:@.*]] = internal externally_initialized global i8* getelementptr inbounds ([27 x i8], [27 x i8]* [[WithUnsignedIntegerMeth]]
|
||||||
// CHECK: [[stringWithUTF8StringMeth:@.*]] = private unnamed_addr constant [22 x i8] c"stringWithUTF8String:\00"
|
// CHECK: [[stringWithUTF8StringMeth:@.*]] = private unnamed_addr constant [22 x i8] c"stringWithUTF8String:\00"
|
||||||
// CHECK: [[stringWithUTF8StringSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[stringWithUTF8StringMeth]]
|
// CHECK: [[stringWithUTF8StringSEL:@.*]] = internal externally_initialized global i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[stringWithUTF8StringMeth]]
|
||||||
// CHECK: [[STR0:.*]] = private unnamed_addr constant [4 x i8] c"abc\00", section "__TEXT,__cstring,cstring_literals", align 1
|
// CHECK: [[STR0:.*]] = private unnamed_addr constant [4 x i8] c"abc\00", section "__TEXT,__cstring,cstring_literals", align 1
|
||||||
// CHECK: [[UNNAMED_CFSTRING:.*]] = private global [[STRUCT_NSCONSTANT_STRING_TAG]] { i32* getelementptr inbounds ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([4 x i8], [4 x i8]* [[STR0]], i32 0, i32 0), i64 3 }, section "__DATA,__cfstring", align 8
|
// CHECK: [[UNNAMED_CFSTRING:.*]] = private global [[STRUCT_NSCONSTANT_STRING_TAG]] { i32* getelementptr inbounds ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([4 x i8], [4 x i8]* [[STR0]], i32 0, i32 0), i64 3 }, section "__DATA,__cfstring", align 8
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH1" = weak global {{.*}}, align 8
|
// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH1" = weak global {{.*}}, align 8
|
||||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH2" = external global
|
// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH2" = external global
|
||||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH3" = global {{.*}}, section "__DATA,__objc_const", align 8
|
// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH3" = global {{.*}}, section "__DATA,__objc_const", align 8
|
||||||
// CHECK-X86_64: @"OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA,__objc_classlist,regular,no_dead_strip", align 8
|
// CHECK-X86_64: @"OBJC_LABEL_CLASS_$" = internal 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 im0]"
|
||||||
// CHECK-X86_64: define internal void @"\01-[A(Cat) im1]"
|
// CHECK-X86_64: define internal void @"\01-[A(Cat) im1]"
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH1" = weak global {{.*}}, align 4
|
// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH1" = weak global {{.*}}, align 4
|
||||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH2" = external global
|
// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH2" = external global
|
||||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH3" = global {{.*}}, section "__DATA,__objc_const", align 4
|
// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH3" = global {{.*}}, section "__DATA,__objc_const", align 4
|
||||||
// CHECK-ARMV6: @"OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA,__objc_classlist,regular,no_dead_strip", align 4
|
// CHECK-ARMV6: @"OBJC_LABEL_CLASS_$" = internal 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 im0]"
|
||||||
// CHECK-ARMV6: define internal void @"\01-[A(Cat) im1]"
|
// CHECK-ARMV6: define internal void @"\01-[A(Cat) im1]"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
|
// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck -check-prefix=FRAGILE %s
|
||||||
// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s
|
// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck -check-prefix=NONFRAGILE %s
|
||||||
|
|
||||||
// CHECK: @OBJC_SELECTOR_REFERENCES_ = private externally_initialized global
|
// NONFRAGILE: @OBJC_SELECTOR_REFERENCES_ = internal externally_initialized global
|
||||||
|
// FRAGILE: @OBJC_SELECTOR_REFERENCES_ = private externally_initialized global
|
||||||
|
|
||||||
void test(id x) {
|
void test(id x) {
|
||||||
[x doSomething];
|
[x doSomething];
|
||||||
|
|
|
@ -20,20 +20,20 @@ int main() {
|
||||||
|
|
||||||
// CHECK: @"_OBJC_PROTOCOL_$_P0" = weak hidden global
|
// CHECK: @"_OBJC_PROTOCOL_$_P0" = weak hidden global
|
||||||
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P0" = weak hidden global
|
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P0" = weak hidden global
|
||||||
// CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = private global
|
// CHECK: @"_OBJC_CLASS_PROTOCOLS_$_A" = internal global
|
||||||
// CHECK: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global
|
// CHECK: @"_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global
|
||||||
|
|
||||||
// CHECK: llvm.used = appending global [3 x i8*]
|
// CHECK: llvm.used = appending global [3 x i8*]
|
||||||
// CHECK-SAME: "_OBJC_PROTOCOL_$_P0"
|
// CHECK-SAME: "_OBJC_PROTOCOL_$_P0"
|
||||||
// CHECK-SAME: "_OBJC_LABEL_PROTOCOL_$_P0"
|
// CHECK-SAME: "_OBJC_LABEL_PROTOCOL_$_P0"
|
||||||
// CHECK-SAME: "\01l_OBJC_PROTOCOL_REFERENCE_$_P0"
|
// CHECK-SAME: "_OBJC_PROTOCOL_REFERENCE_$_P0"
|
||||||
|
|
||||||
// CHECK: llvm.compiler.used = appending global [7 x i8*]
|
// CHECK: llvm.compiler.used = appending global [7 x i8*]
|
||||||
// CHECK-SAME: OBJC_CLASS_NAME_
|
// CHECK-SAME: OBJC_CLASS_NAME_
|
||||||
// CHECK-SAME: OBJC_METH_VAR_NAME_
|
// CHECK-SAME: OBJC_METH_VAR_NAME_
|
||||||
// CHECK-SAME: OBJC_METH_VAR_TYPE_
|
// CHECK-SAME: OBJC_METH_VAR_TYPE_
|
||||||
// CHECK-SAME: "\01l_OBJC_$_CLASS_METHODS_A"
|
// CHECK-SAME: "_OBJC_$_CLASS_METHODS_A"
|
||||||
// CHECK-SAME: OBJC_CLASS_NAME_.1
|
// CHECK-SAME: OBJC_CLASS_NAME_.1
|
||||||
// CHECK-SAME: "\01l_OBJC_CLASS_PROTOCOLS_$_A"
|
// CHECK-SAME: "_OBJC_CLASS_PROTOCOLS_$_A"
|
||||||
// CHECK-SAME: "OBJC_LABEL_CLASS_$"
|
// CHECK-SAME: "OBJC_LABEL_CLASS_$"
|
||||||
// CHECK-SAME: section "llvm.metadata"
|
// CHECK-SAME: section "llvm.metadata"
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
@synthesize prop;
|
@synthesize prop;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// CHECK: l_OBJC_$_INSTANCE_METHODS_Bar:
|
// CHECK: _OBJC_$_INSTANCE_METHODS_Bar:
|
||||||
// CHECK-NEXT: .long 24
|
// CHECK-NEXT: .long 24
|
||||||
// CHECK-NEXT: .long 2
|
// CHECK-NEXT: .long 2
|
||||||
// CHECK-NEXT: .quad L_OBJC_METH_VAR_NAME_
|
// CHECK-NEXT: .quad L_OBJC_METH_VAR_NAME_
|
||||||
|
|
|
@ -2,24 +2,24 @@
|
||||||
|
|
||||||
// CHECK: @"OBJC_IVAR_$_I3._iv2" = global i64 8, section "__DATA, __objc_ivar", align 8
|
// 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_IVAR_$_I3._iv3" = global i64 12, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I3" = private global {{.*}} { i32 0, i32 8, i32 13
|
// CHECK: _OBJC_CLASS_RO_$_I3" = internal global {{.*}} { i32 0, i32 8, i32 13
|
||||||
// CHECK: @"OBJC_IVAR_$_I4._iv4" = global i64 13, section "__DATA, __objc_ivar", align 8
|
// CHECK: @"OBJC_IVAR_$_I4._iv4" = global i64 13, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I4" = private global {{.*}} { i32 0, i32 13, i32 14, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I4" = internal 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._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._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_IVAR_$_I5._iv5" = global i64 14, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I5" = private global {{.*}} { i32 0, i32 14, i32 24, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I5" = internal global {{.*}} { i32 0, i32 14, i32 24, {{.*}}
|
||||||
// CHECK: @"OBJC_IVAR_$_I6.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
|
// CHECK: @"OBJC_IVAR_$_I6.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I6" = private global {{.*}} { i32 2, i32 0, i32 1, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I6" = internal global {{.*}} { i32 2, i32 0, i32 1, {{.*}}
|
||||||
// CHECK: @"OBJC_IVAR_$_I8.b" = global i64 8, section "__DATA, __objc_ivar", align 8
|
// CHECK: @"OBJC_IVAR_$_I8.b" = global i64 8, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I8" = private global {{.*}} { i32 0, i32 8, i32 16, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I8" = internal global {{.*}} { i32 0, i32 8, i32 16, {{.*}}
|
||||||
// CHECK: @"OBJC_IVAR_$_I9.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
|
// CHECK: @"OBJC_IVAR_$_I9.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I9" = private global {{.*}} { i32 2, i32 0, i32 4, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I9" = internal global {{.*}} { i32 2, i32 0, i32 4, {{.*}}
|
||||||
// CHECK: @"OBJC_IVAR_$_I10.iv1" = global i64 4, section "__DATA, __objc_ivar", align 8
|
// CHECK: @"OBJC_IVAR_$_I10.iv1" = global i64 4, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I10" = private global {{.*}} { i32 0, i32 4, i32 5, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I10" = internal global {{.*}} { i32 0, i32 4, i32 5, {{.*}}
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I11" = private global {{.*}} { i32 0, i32 5, i32 5, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I11" = internal global {{.*}} { i32 0, i32 5, i32 5, {{.*}}
|
||||||
// CHECK: @"OBJC_IVAR_$_I12.iv2" = global i64 8, section "__DATA, __objc_ivar", align 8
|
// CHECK: @"OBJC_IVAR_$_I12.iv2" = global i64 8, section "__DATA, __objc_ivar", align 8
|
||||||
// CHECK: _OBJC_CLASS_RO_$_I12" = private global {{.*}} { i32 0, i32 8, i32 12, {{.*}}
|
// CHECK: _OBJC_CLASS_RO_$_I12" = internal global {{.*}} { i32 0, i32 8, i32 12, {{.*}}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Compare to:
|
Compare to:
|
||||||
|
|
|
@ -2,33 +2,33 @@
|
||||||
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NULL %s
|
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NULL %s
|
||||||
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11 -emit-llvm -o - -fobjc-runtime=macosx-fragile-10.5 %s | FileCheck -check-prefix=CHECK-FRAGILE %s
|
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11 -emit-llvm -o - -fobjc-runtime=macosx-fragile-10.5 %s | FileCheck -check-prefix=CHECK-FRAGILE %s
|
||||||
|
|
||||||
// CHECK: @"\01l_OBJC_$_CLASS_PROP_LIST_Proto" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CLASS_PROP_LIST_Proto" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"_OBJC_PROTOCOL_$_Proto" = {{.*}} global %struct._protocol_t { {{.*}} i32 96, i32 {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_Proto" {{.*}} }
|
// CHECK: @"_OBJC_PROTOCOL_$_Proto" = {{.*}} global %struct._protocol_t { {{.*}} i32 96, i32 {{.*}} @"_OBJC_$_CLASS_PROP_LIST_Proto" {{.*}} }
|
||||||
// CHECK: @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_CATEGORY_Foo_$_Category" = private global %struct._category_t { {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" {{.*}}, i32 64 }, section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CATEGORY_Foo_$_Category" = internal global %struct._category_t { {{.*}} @"_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" {{.*}}, i32 64 }, section "__DATA, __objc_const", align 8
|
||||||
|
|
||||||
// CHECK: @"\01l_OBJC_$_CLASS_PROP_LIST_C" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CLASS_PROP_LIST_C" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_METACLASS_RO_$_C" = private global %struct._class_ro_t { {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_C" {{.*}} }, section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_METACLASS_RO_$_C" = internal global %struct._class_ro_t { {{.*}} @"_OBJC_$_CLASS_PROP_LIST_C" {{.*}} }, section "__DATA, __objc_const", align 8
|
||||||
|
|
||||||
// CHECK: !{i32 1, !"Objective-C Class Properties", i32 64}
|
// CHECK: !{i32 1, !"Objective-C Class Properties", i32 64}
|
||||||
|
|
||||||
// CHECK-NULL-NOT: @"\01l_OBJC_$_CLASS_PROP_LIST_Proto"
|
// CHECK-NULL-NOT: @"_OBJC_$_CLASS_PROP_LIST_Proto"
|
||||||
// CHECK-NULL: @"_OBJC_PROTOCOL_$_Proto" = {{.*}} global %struct._protocol_t { {{.*}} %struct._prop_list_t* null, i32 96, i32 {{.*}} %struct._prop_list_t* null }
|
// CHECK-NULL: @"_OBJC_PROTOCOL_$_Proto" = {{.*}} global %struct._protocol_t { {{.*}} %struct._prop_list_t* null, i32 96, i32 {{.*}} %struct._prop_list_t* null }
|
||||||
// CHECK-NULL-NOT: @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK-NULL-NOT: @"_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK-NULL: @"\01l_OBJC_$_CATEGORY_Foo_$_Category" = private global %struct._category_t { {{.*}} %struct._prop_list_t* null, %struct._prop_list_t* null, {{.*}} }, section "__DATA, __objc_const", align 8
|
// CHECK-NULL: @"_OBJC_$_CATEGORY_Foo_$_Category" = internal global %struct._category_t { {{.*}} %struct._prop_list_t* null, %struct._prop_list_t* null, {{.*}} }, section "__DATA, __objc_const", align 8
|
||||||
|
|
||||||
// CHECK-NULL-NOT: @"\01l_OBJC_$_CLASS_PROP_LIST_C" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK-NULL-NOT: @"_OBJC_$_CLASS_PROP_LIST_C" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK-NULL: @"\01l_OBJC_METACLASS_RO_$_C" = private global %struct._class_ro_t { {{.*}} %struct._prop_list_t* null }, section "__DATA, __objc_const", align 8
|
// CHECK-NULL: @"_OBJC_METACLASS_RO_$_C" = internal global %struct._class_ro_t { {{.*}} %struct._prop_list_t* null }, section "__DATA, __objc_const", align 8
|
||||||
|
|
||||||
// CHECK-NULL: !{i32 1, !"Objective-C Class Properties", i32 64}
|
// CHECK-NULL: !{i32 1, !"Objective-C Class Properties", i32 64}
|
||||||
|
|
||||||
// CHECK-FRAGILE: @"OBJC_$_CLASS_PROP_PROTO_LIST_Proto" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8
|
// CHECK-FRAGILE: @"OBJC_$_CLASS_PROP_PROTO_LIST_Proto" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8
|
||||||
// CHECK-FRAGILE: @"\01l_OBJC_PROTOCOLEXT_Proto" = private global %struct._objc_protocol_extension { i32 48, {{.*}} @"OBJC_$_CLASS_PROP_PROTO_LIST_Proto" {{.*}} }, align 8
|
// CHECK-FRAGILE: @_OBJC_PROTOCOLEXT_Proto = internal global %struct._objc_protocol_extension { i32 48, {{.*}} @"OBJC_$_CLASS_PROP_PROTO_LIST_Proto" {{.*}} }, align 8
|
||||||
// CHECK-FRAGILE: @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_Category" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8
|
// CHECK-FRAGILE: @"_OBJC_$_CLASS_PROP_LIST_Foo_Category" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8
|
||||||
// CHECK-FRAGILE: @OBJC_CATEGORY_Foo_Category = private global %struct._objc_category { {{.*}}, i32 64, {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_Category" {{.*}} }, section "__OBJC,__category,regular,no_dead_strip", align 8
|
// CHECK-FRAGILE: @OBJC_CATEGORY_Foo_Category = private global %struct._objc_category { {{.*}}, i32 64, {{.*}} @"_OBJC_$_CLASS_PROP_LIST_Foo_Category" {{.*}} }, section "__OBJC,__category,regular,no_dead_strip", align 8
|
||||||
|
|
||||||
// CHECK-FRAGILE: @"\01l_OBJC_$_CLASS_PROP_LIST_C" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8
|
// CHECK-FRAGILE: @"_OBJC_$_CLASS_PROP_LIST_C" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8
|
||||||
// CHECK-FRAGILE: @OBJC_CLASSEXT_C = private global %struct._objc_class_extension { {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_C" {{.*}} }, section "__OBJC,__class_ext,regular,no_dead_strip", align 8
|
// CHECK-FRAGILE: @OBJC_CLASSEXT_C = private global %struct._objc_class_extension { {{.*}} @"_OBJC_$_CLASS_PROP_LIST_C" {{.*}} }, section "__OBJC,__class_ext,regular,no_dead_strip", align 8
|
||||||
|
|
||||||
// CHECK-FRAGILE: !{i32 1, !"Objective-C Class Properties", i32 64}
|
// CHECK-FRAGILE: !{i32 1, !"Objective-C Class Properties", i32 64}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// CHECK: .lazy_reference .objc_class_name_J0
|
// CHECK: .lazy_reference .objc_class_name_J0
|
||||||
|
|
||||||
// CHECK: @OBJC_METH_VAR_TYPE_{{.*}} = private unnamed_addr constant {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
// CHECK: @OBJC_METH_VAR_TYPE_{{.*}} = private unnamed_addr constant {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||||
// CHECK: @"\01l_OBJC_PROTOCOLEXT_P" = private global {{.*}}}, align
|
// CHECK: @_OBJC_PROTOCOLEXT_P = internal global {{.*}}}, align
|
||||||
// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
||||||
// CHECK: @OBJC_METH_VAR_NAME_{{.*}} = private unnamed_addr constant {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
// CHECK: @OBJC_METH_VAR_NAME_{{.*}} = private unnamed_addr 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_INSTANCE_METHODS_P = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
// CHECK: @OBJC_INSTANCE_VARIABLES_A = private global {{.*}}section "__OBJC,__instance_vars,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_INSTANCE_METHODS_A = private global {{.*}}section "__OBJC,__inst_meth,regular,no_dead_strip", align 4
|
||||||
// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private unnamed_addr constant {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
|
// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private unnamed_addr 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_$_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_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
|
// CHECK: @OBJC_CLASS_A = private global {{.*}}section "__OBJC,__class,regular,no_dead_strip", align 4
|
||||||
// CHECK: @OBJC_CATEGORY_INSTANCE_METHODS_A_Cat = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
|
// CHECK: @OBJC_CATEGORY_INSTANCE_METHODS_A_Cat = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
|
||||||
|
|
|
@ -8,29 +8,29 @@
|
||||||
// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_classname,cstring_literals", align 1
|
// CHECK: @OBJC_CLASS_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_classname,cstring_literals", align 1
|
||||||
// CHECK: @OBJC_METH_VAR_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
|
// CHECK: @OBJC_METH_VAR_NAME_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
|
||||||
// CHECK: @OBJC_METH_VAR_TYPE_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_methtype,cstring_literals", align 1
|
// CHECK: @OBJC_METH_VAR_TYPE_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__objc_methtype,cstring_literals", align 1
|
||||||
// CHECK: @"\01l_OBJC_$_CLASS_METHODS_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CLASS_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_P" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_PROTOCOL_INSTANCE_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_PROTOCOL_CLASS_METHODS_P" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_PROTOCOL_CLASS_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"_OBJC_PROTOCOL_$_P" = weak hidden global {{.*}}, align 8
|
// CHECK: @"_OBJC_PROTOCOL_$_P" = weak hidden global {{.*}}, align 8
|
||||||
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global {{.*}} section "__DATA,__objc_protolist,coalesced,no_dead_strip", align 8
|
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global {{.*}} section "__DATA,__objc_protolist,coalesced,no_dead_strip", align 8
|
||||||
// CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_CLASS_PROTOCOLS_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_METACLASS_RO_$_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_METACLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_INSTANCE_METHODS_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_INSTANCE_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_INSTANCE_VARIABLES_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_INSTANCE_VARIABLES_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__cstring,cstring_literals", align 1
|
// CHECK: @OBJC_PROP_NAME_ATTR_{{[0-9]*}} = private unnamed_addr constant {{.*}} section "__TEXT,__cstring,cstring_literals", align 1
|
||||||
// CHECK: @"\01l_OBJC_$_PROP_LIST_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_PROP_LIST_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_CLASS_RO_$_A" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_CLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_CATEGORY_INSTANCE_METHODS_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CATEGORY_INSTANCE_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_CATEGORY_CLASS_METHODS_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CATEGORY_CLASS_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"\01l_OBJC_$_CATEGORY_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
|
// CHECK: @"_OBJC_$_CATEGORY_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
|
||||||
// CHECK: @"OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = private global {{.*}} section "__DATA,__objc_superrefs,regular,no_dead_strip", align 8
|
// CHECK: @"OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA,__objc_superrefs,regular,no_dead_strip", align 8
|
||||||
// CHECK: @OBJC_SELECTOR_REFERENCES_ = private externally_initialized global {{.*}} section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
|
// CHECK: @OBJC_SELECTOR_REFERENCES_ = internal externally_initialized global {{.*}} section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
|
||||||
// CHECK: @"OBJC_CLASSLIST_SUP_REFS_$_{{[\.0-9]*}}" = private global {{.*}} section "__DATA,__objc_superrefs,regular,no_dead_strip", align 8
|
// CHECK: @"OBJC_CLASSLIST_SUP_REFS_$_{{[\.0-9]*}}" = internal global {{.*}} section "__DATA,__objc_superrefs,regular,no_dead_strip", align 8
|
||||||
// CHECK: @"OBJC_CLASS_$_B" = external global
|
// CHECK: @"OBJC_CLASS_$_B" = external global
|
||||||
// CHECK: @"OBJC_CLASSLIST_REFERENCES_$_{{[0-9]*}}" = private global {{.*}} section "__DATA,__objc_classrefs,regular,no_dead_strip", align 8
|
// CHECK: @"OBJC_CLASSLIST_REFERENCES_$_{{[0-9]*}}" = internal 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: @_objc_msgSend_fixup_alloc = weak hidden global {{.*}} section "__DATA,__objc_msgrefs,coalesced", align 16
|
||||||
// CHECK: @"OBJC_LABEL_CLASS_$" = private global {{.*}} section "__DATA,__objc_classlist,regular,no_dead_strip", align 8
|
// CHECK: @"OBJC_LABEL_CLASS_$" = internal global {{.*}} section "__DATA,__objc_classlist,regular,no_dead_strip", align 8
|
||||||
// CHECK: @"OBJC_LABEL_CATEGORY_$" = private global {{.*}} section "__DATA,__objc_catlist,regular,no_dead_strip", align 8
|
// CHECK: @"OBJC_LABEL_CATEGORY_$" = internal global {{.*}} section "__DATA,__objc_catlist,regular,no_dead_strip", align 8
|
||||||
// CHECK: @objc_msgSend_fpret(
|
// CHECK: @objc_msgSend_fpret(
|
||||||
// CHECK: @objc_msgSend_fixup(
|
// CHECK: @objc_msgSend_fixup(
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, align 8
|
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, align 8
|
||||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH2" = external global
|
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH2" = external global
|
||||||
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 8
|
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 8
|
||||||
// CHECK-X86_64: @"OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA,__objc_classlist,regular,no_dead_strip", align 8
|
// CHECK-X86_64: @"OBJC_LABEL_CLASS_$" = internal 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 im0]"
|
||||||
// CHECK-X86_64: define internal void @"\01-[A(Cat) im1]"
|
// CHECK-X86_64: define internal void @"\01-[A(Cat) im1]"
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, align 4
|
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, align 4
|
||||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH2" = external global
|
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH2" = external global
|
||||||
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 4
|
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 4
|
||||||
// CHECK-ARMV6: @"OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA,__objc_classlist,regular,no_dead_strip", align 4
|
// CHECK-ARMV6: @"OBJC_LABEL_CLASS_$" = internal 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 im0]"
|
||||||
// CHECK-ARMV6: define internal void @"\01-[A(Cat) im1]"
|
// CHECK-ARMV6: define internal void @"\01-[A(Cat) im1]"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// CHECK-MODERN: @"OBJC_IVAR_$_HighlyAlignedSubclass.ivar2" = global i64 24,
|
// CHECK-MODERN: @"OBJC_IVAR_$_HighlyAlignedSubclass.ivar2" = global i64 24,
|
||||||
// CHECK-MODERN: @"OBJC_IVAR_$_HighlyAlignedSubclass.ivar" = global i64 16,
|
// CHECK-MODERN: @"OBJC_IVAR_$_HighlyAlignedSubclass.ivar" = global i64 16,
|
||||||
// CHECK-MODERN: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\02\00"
|
// CHECK-MODERN: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\02\00"
|
||||||
// CHECK-MODERN: @"\01l_OBJC_CLASS_RO_$_HighlyAlignedSubclass" = {{.*}} {
|
// CHECK-MODERN: @"_OBJC_CLASS_RO_$_HighlyAlignedSubclass" = {{.*}} {
|
||||||
// CHECK-FRAGILE: @OBJC_INSTANCE_VARIABLES_HighlyAlignedSubclass = {{.*}}, i32 8 }, {{.*}}, i32 12 }]
|
// CHECK-FRAGILE: @OBJC_INSTANCE_VARIABLES_HighlyAlignedSubclass = {{.*}}, i32 8 }, {{.*}}, i32 12 }]
|
||||||
// CHECK-FRAGILE: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\02\00"
|
// CHECK-FRAGILE: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\02\00"
|
||||||
// CHECK-FRAGILE: @OBJC_CLASS_HighlyAlignedSubclass
|
// CHECK-FRAGILE: @OBJC_CLASS_HighlyAlignedSubclass
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
@implementation HighlyAlignedSubclass @end
|
@implementation HighlyAlignedSubclass @end
|
||||||
|
|
||||||
// CHECK-MODERN: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\01\00"
|
// CHECK-MODERN: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\01\00"
|
||||||
// CHECK-MODERN: @"\01l_OBJC_CLASS_RO_$_Foo" = {{.*}} { i32 772
|
// CHECK-MODERN: @"_OBJC_CLASS_RO_$_Foo" = {{.*}} { i32 772
|
||||||
// 772 == 0x304
|
// 772 == 0x304
|
||||||
// ^ HasMRCWeakIvars
|
// ^ HasMRCWeakIvars
|
||||||
// ^ HasCXXDestructorOnly
|
// ^ HasCXXDestructorOnly
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -Wno-objc-root-class -emit-llvm -o - %s | FileCheck %s
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -Wno-objc-root-class -emit-llvm -o - %s | FileCheck %s
|
||||||
|
|
||||||
// CHECK: @"OBJC_LABEL_NONLAZY_CLASS_$" = private global [3 x {{.*}}]{{.*}}@"OBJC_CLASS_$_A"{{.*}},{{.*}}@"OBJC_CLASS_$_D"{{.*}},{{.*}}"OBJC_CLASS_$_E"{{.*}} section "__DATA,__objc_nlclslist,regular,no_dead_strip", align 8
|
// CHECK: @"OBJC_LABEL_NONLAZY_CLASS_$" = internal global [3 x {{.*}}]{{.*}}@"OBJC_CLASS_$_A"{{.*}},{{.*}}@"OBJC_CLASS_$_D"{{.*}},{{.*}}"OBJC_CLASS_$_E"{{.*}} section "__DATA,__objc_nlclslist,regular,no_dead_strip", align 8
|
||||||
// CHECK: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = private global [2 x {{.*}}] {{.*}}@"\01l_OBJC_$_CATEGORY_A_$_Cat"{{.*}},{{.*}}@"\01l_OBJC_$_CATEGORY_E_$_MyCat"{{.*}}, section "__DATA,__objc_nlcatlist,regular,no_dead_strip", align 8
|
// CHECK: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = internal global [2 x {{.*}}] {{.*}}@"_OBJC_$_CATEGORY_A_$_Cat"{{.*}},{{.*}}@"_OBJC_$_CATEGORY_E_$_MyCat"{{.*}}, section "__DATA,__objc_nlcatlist,regular,no_dead_strip", align 8
|
||||||
|
|
||||||
@interface A @end
|
@interface A @end
|
||||||
@implementation A
|
@implementation A
|
||||||
|
|
|
@ -15,4 +15,4 @@ __attribute__((visibility("default"))) __attribute__((availability(ios,introduce
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// CHECK: @"OBJC_METACLASS_$_ObserverQuery" = global %struct._class_t
|
// CHECK: @"OBJC_METACLASS_$_ObserverQuery" = global %struct._class_t
|
||||||
// CHECK: @OBJC_SELECTOR_REFERENCES_ = private externally_initialized global
|
// CHECK: @OBJC_SELECTOR_REFERENCES_ = internal externally_initialized global
|
||||||
|
|
|
@ -15,6 +15,6 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category" = private global
|
// CHECK: _OBJC_$_PROP_LIST_Foo_$_Category" = internal global
|
||||||
// CHECK: l_OBJC_$_CATEGORY_Foo_$_Category" = private global
|
// CHECK: _OBJC_$_CATEGORY_Foo_$_Category" = internal global
|
||||||
// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category
|
// CHECK: _OBJC_$_PROP_LIST_Foo_$_Category
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
|
||||||
// CHECK: l_OBJC_$_PROP_LIST_C2" = private global { i32, i32, [3 x %struct._prop_t] } { i32 16, i32 3
|
// CHECK: _OBJC_$_PROP_LIST_C2" = internal global { i32, i32, [3 x %struct._prop_t] } { i32 16, i32 3
|
||||||
|
|
||||||
@protocol P
|
@protocol P
|
||||||
@property int i;
|
@property int i;
|
||||||
|
|
|
@ -18,7 +18,7 @@ __attribute__((objc_root_class))
|
||||||
// Metadata for _myprop should be present, and PROP_LIST for Foo should have
|
// Metadata for _myprop should be present, and PROP_LIST for Foo should have
|
||||||
// only one entry.
|
// only one entry.
|
||||||
// CHECK: = private unnamed_addr constant [12 x i8] c"Ti,V_myprop\00",
|
// CHECK: = private unnamed_addr constant [12 x i8] c"Ti,V_myprop\00",
|
||||||
// CHECK: @"\01l_OBJC_$_PROP_LIST_Foo" = private global { i32, i32, [1 x %struct._prop_t] }
|
// CHECK: @"_OBJC_$_PROP_LIST_Foo" = internal global { i32, i32, [1 x %struct._prop_t] }
|
||||||
|
|
||||||
// Readonly property in interface made readwrite in a category:
|
// Readonly property in interface made readwrite in a category:
|
||||||
__attribute__((objc_root_class))
|
__attribute__((objc_root_class))
|
||||||
|
@ -44,4 +44,4 @@ __attribute__((objc_root_class))
|
||||||
// CHECK: [[evolvingsetter:@OBJC_PROP_NAME_ATTR[^ ]+]] = private unnamed_addr constant [18 x i8] c"Ti,V_evolvingprop\00",
|
// CHECK: [[evolvingsetter:@OBJC_PROP_NAME_ATTR[^ ]+]] = private unnamed_addr constant [18 x i8] c"Ti,V_evolvingprop\00",
|
||||||
// CHECK: [[booleanmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private unnamed_addr constant [34 x i8] c"Ti,N,GisBooleanProp,V_booleanProp\00"
|
// CHECK: [[booleanmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private unnamed_addr constant [34 x i8] c"Ti,N,GisBooleanProp,V_booleanProp\00"
|
||||||
// CHECK: [[weakmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private unnamed_addr constant [23 x i8] c"T@\22Foo\22,W,N,V_weakProp\00"
|
// CHECK: [[weakmetadata:@OBJC_PROP_NAME_ATTR[^ ]+]] = private unnamed_addr 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]]
|
// CHECK: @"_OBJC_$_PROP_LIST_FooRO" = internal global { i32, i32, [3 x %struct._prop_t] }{{.*}}[[evolvinggetter]]{{.*}}[[evolvingsetter]]{{.*}}[[booleanmetadata]]
|
||||||
|
|
|
@ -20,8 +20,8 @@ _Bool f(void) {
|
||||||
|
|
||||||
// CHECK: $"_OBJC_PROTOCOL_$_P" = comdat any
|
// CHECK: $"_OBJC_PROTOCOL_$_P" = comdat any
|
||||||
// CHECK: $"_OBJC_LABEL_PROTOCOL_$_P" = comdat any
|
// CHECK: $"_OBJC_LABEL_PROTOCOL_$_P" = comdat any
|
||||||
// CHECK: $"\01l_OBJC_PROTOCOL_REFERENCE_$_Q" = comdat any
|
// CHECK: $"_OBJC_PROTOCOL_REFERENCE_$_Q" = comdat any
|
||||||
// CHECK: $"\01l_OBJC_PROTOCOL_REFERENCE_$_R" = comdat any
|
// CHECK: $"_OBJC_PROTOCOL_REFERENCE_$_R" = comdat any
|
||||||
|
|
||||||
// CHECK: @"_OBJC_PROTOCOL_$_P" = {{.*}}, comdat
|
// CHECK: @"_OBJC_PROTOCOL_$_P" = {{.*}}, comdat
|
||||||
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, comdat
|
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, comdat
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
|
||||||
|
|
||||||
// CHECK: @"\01l_OBJC_$_PROTOCOL_METHOD_TYPES_P1" = private global
|
// CHECK: @"_OBJC_$_PROTOCOL_METHOD_TYPES_P1" = internal global
|
||||||
// CHECK: @[[PROTO_P1:"_OBJC_PROTOCOL_\$_P1"]] = weak hidden
|
// CHECK: @[[PROTO_P1:"_OBJC_PROTOCOL_\$_P1"]] = weak hidden
|
||||||
// CHECK: @[[LABEL_PROTO_P1:"_OBJC_LABEL_PROTOCOL_\$_P1"]] = weak hidden global %{{.*}}* @[[PROTO_P1]]
|
// CHECK: @[[LABEL_PROTO_P1:"_OBJC_LABEL_PROTOCOL_\$_P1"]] = weak hidden global %{{.*}}* @[[PROTO_P1]]
|
||||||
// CHECK: @[[PROTO_P2:"_OBJC_PROTOCOL_\$_P2"]] = weak hidden
|
// CHECK: @[[PROTO_P2:"_OBJC_PROTOCOL_\$_P2"]] = weak hidden
|
||||||
// CHECK: @[[LABEL_PROTO_P2:"_OBJC_LABEL_PROTOCOL_\$_P2"]] = weak hidden global %{{.*}}* @[[PROTO_P2]]
|
// CHECK: @[[LABEL_PROTO_P2:"_OBJC_LABEL_PROTOCOL_\$_P2"]] = weak hidden global %{{.*}}* @[[PROTO_P2]]
|
||||||
// CHECK: @"\01l_OBJC_$_PROTOCOL_REFS_P3" = private global { i64, [3 x %{{.*}}] } { i64 2, [3 x %{{.*}}*] [%{{.*}}* @[[PROTO_P1]], %{{.*}}* @[[PROTO_P2]], %{{.*}}* null] }
|
// CHECK: @"_OBJC_$_PROTOCOL_REFS_P3" = internal global { i64, [3 x %{{.*}}] } { i64 2, [3 x %{{.*}}*] [%{{.*}}* @[[PROTO_P1]], %{{.*}}* @[[PROTO_P2]], %{{.*}}* null] }
|
||||||
// CHECK: @[[PROTO_P3:"_OBJC_PROTOCOL_\$_P3"]] = weak hidden
|
// CHECK: @[[PROTO_P3:"_OBJC_PROTOCOL_\$_P3"]] = weak hidden
|
||||||
// CHECK: @[[LABEL_PROTO_P3:"_OBJC_LABEL_PROTOCOL_\$_P3"]] = weak hidden global %{{.*}}* @[[PROTO_P3]]
|
// CHECK: @[[LABEL_PROTO_P3:"_OBJC_LABEL_PROTOCOL_\$_P3"]] = weak hidden global %{{.*}}* @[[PROTO_P3]]
|
||||||
// CHECK: "\01l_OBJC_PROTOCOL_REFERENCE_$_P3" = weak hidden global %{{.*}}* bitcast (%{{.*}}* @[[PROTO_P3]] to %{{.*}}*)
|
// CHECK: "_OBJC_PROTOCOL_REFERENCE_$_P3" = weak hidden global %{{.*}}* bitcast (%{{.*}}* @[[PROTO_P3]] to %{{.*}}*)
|
||||||
// CHECK: @[[PROTO_P0:"_OBJC_PROTOCOL_\$_P0"]] = weak hidden
|
// CHECK: @[[PROTO_P0:"_OBJC_PROTOCOL_\$_P0"]] = weak hidden
|
||||||
// CHECK: @[[LABEL_PROTO_P0:"_OBJC_LABEL_PROTOCOL_\$_P0"]] = weak hidden global %{{.*}}* @[[PROTO_P0]]
|
// CHECK: @[[LABEL_PROTO_P0:"_OBJC_LABEL_PROTOCOL_\$_P0"]] = weak hidden global %{{.*}}* @[[PROTO_P0]]
|
||||||
// CHECK: "\01l_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global %0* bitcast (%{{.*}}* @[[PROTO_P0]] to %{{.*}}*)
|
// CHECK: "_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global %0* bitcast (%{{.*}}* @[[PROTO_P0]] to %{{.*}}*)
|
||||||
// CHECK: "\01l_OBJC_PROTOCOL_REFERENCE_$_P1" = weak hidden global %0* bitcast (%{{.*}}* @[[PROTO_P1]] to %{{.*}}*)
|
// CHECK: "_OBJC_PROTOCOL_REFERENCE_$_P1" = weak hidden global %0* bitcast (%{{.*}}* @[[PROTO_P1]] to %{{.*}}*)
|
||||||
// CHECK: "\01l_OBJC_PROTOCOL_REFERENCE_$_P2" = weak hidden global %0* bitcast (%{{.*}}* @[[PROTO_P2]] to %{{.*}}*)
|
// CHECK: "_OBJC_PROTOCOL_REFERENCE_$_P2" = weak hidden global %0* bitcast (%{{.*}}* @[[PROTO_P2]] to %{{.*}}*)
|
||||||
|
|
||||||
void p(const char*, ...);
|
void p(const char*, ...);
|
||||||
|
|
||||||
|
|
|
@ -31,15 +31,15 @@ __declspec(dllexport)
|
||||||
// CHECK-NOT: @"OBJC_IVAR_$_Interface._property" = {{.*}} section "__DATA, __objc_ivar"
|
// CHECK-NOT: @"OBJC_IVAR_$_Interface._property" = {{.*}} section "__DATA, __objc_ivar"
|
||||||
// CHECK-NOT: @"OBJC_CLASS_$_Interface" = {{.*}} section "__DATA, __objc_data"
|
// CHECK-NOT: @"OBJC_CLASS_$_Interface" = {{.*}} section "__DATA, __objc_data"
|
||||||
// CHECK-NOT: @"OBJC_METACLASS_$_Interface" = {{.*}} section "__DATA, __objc_data"
|
// CHECK-NOT: @"OBJC_METACLASS_$_Interface" = {{.*}} section "__DATA, __objc_data"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_CLASS_METHODS_Interface" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_CLASS_METHODS_Interface" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_Protocol" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_PROTOCOL_INSTANCE_METHODS_Protocol" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_PROTOCOL_METHOD_TYPES_Protocol" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_PROTOCOL_METHOD_TYPES_Protocol" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_CLASS_PROTOCOLS_$_Interface" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_CLASS_PROTOCOLS_$_Interface" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_METACLASS_RO_$_" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_METACLASS_RO_$_" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_INSTANCE_METHODS_Interface" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_INSTANCE_METHODS_Interface" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_INSTANCE_VARIABLES_Interface" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_INSTANCE_VARIABLES_Interface" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_PROP_LIST_Interface" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_PROP_LIST_Interface" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_CLASS_RO_$_Interface" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_CLASS_RO_$_Interface" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_CATEGORY_INSTANCE_METHODS_Interface_$_Category" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_CATEGORY_INSTANCE_METHODS_Interface_$_Category" = {{.*}} section "__DATA, __objc_const"
|
||||||
// CHECK-NOT: @"\01l_OBJC_$_CATEGORY_Interface_$_Category" = {{.*}} section "__DATA, __objc_const"
|
// CHECK-NOT: @"_OBJC_$_CATEGORY_Interface_$_Category" = {{.*}} section "__DATA, __objc_const"
|
||||||
|
|
||||||
|
|
|
@ -34,39 +34,42 @@ _Bool f(J *j) {
|
||||||
return [I class] == @protocol(P);
|
return [I class] == @protocol(P);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-COFF: @"OBJC_CLASSLIST_SUP_REFS_$_" = {{.*}}, section ".objc_superrefs$B"
|
// CHECK-COFF: @"_OBJC_$_CLASS_METHODS_I" = private
|
||||||
// CHECK-COFF: @OBJC_SELECTOR_REFERENCES_ = {{.*}}, section ".objc_selrefs$B"
|
// CHECK-COFF: @"OBJC_CLASSLIST_SUP_REFS_$_" = private {{.*}}, section ".objc_superrefs$B"
|
||||||
// CHECK-COFF: @"OBJC_CLASSLIST_REFERENCES_$_" = {{.*}}, section ".objc_classrefs$B"
|
// CHECK-COFF: @OBJC_SELECTOR_REFERENCES_ = private {{.*}}, section ".objc_selrefs$B"
|
||||||
// CHECK-COFF: @"\01l_objc_msgSend_fixup_class" = {{.*}}, section ".objc_msgrefs$B"
|
// CHECK-COFF: @"OBJC_CLASSLIST_REFERENCES_$_" = private {{.*}}, section ".objc_classrefs$B"
|
||||||
|
// CHECK-COFF: @_objc_msgSend_fixup_class = {{.*}}, section ".objc_msgrefs$B"
|
||||||
// CHECK-COFF: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section ".objc_protolist$B"
|
// CHECK-COFF: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section ".objc_protolist$B"
|
||||||
// CHECK-COFF: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section ".objc_protorefs$B"
|
// CHECK-COFF: @"_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section ".objc_protorefs$B"
|
||||||
// CHECK-COFF: @"OBJC_LABEL_CLASS_$" = {{.*}}, section ".objc_classlist$B"
|
// CHECK-COFF: @"OBJC_LABEL_CLASS_$" = private {{.*}}, section ".objc_classlist$B"
|
||||||
// CHECK-COFF: @"OBJC_LABEL_NONLAZY_CLASS_$" = {{.*}}, section ".objc_nlclslist$B"
|
// CHECK-COFF: @"OBJC_LABEL_NONLAZY_CLASS_$" = private {{.*}}, section ".objc_nlclslist$B"
|
||||||
// CHECK-COFF: @"OBJC_LABEL_CATEGORY_$" = {{.*}}, section ".objc_catlist$B"
|
// CHECK-COFF: @"OBJC_LABEL_CATEGORY_$" = private {{.*}}, section ".objc_catlist$B"
|
||||||
// CHECK-COFF: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = {{.*}}, section ".objc_nlcatlist$B"
|
// CHECK-COFF: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = private {{.*}}, section ".objc_nlcatlist$B"
|
||||||
// CHECK-COFF: !{{[0-9]+}} = !{i32 1, !"Objective-C Image Info Section", !".objc_imageinfo$B"}
|
// CHECK-COFF: !{{[0-9]+}} = !{i32 1, !"Objective-C Image Info Section", !".objc_imageinfo$B"}
|
||||||
|
|
||||||
// CHECK-ELF: @"OBJC_CLASSLIST_SUP_REFS_$_" = {{.*}}, section "objc_superrefs"
|
// CHECK-ELF: @"_OBJC_$_CLASS_METHODS_I" = private
|
||||||
// CHECK-ELF: @OBJC_SELECTOR_REFERENCES_ = {{.*}}, section "objc_selrefs"
|
// CHECK-ELF: @"OBJC_CLASSLIST_SUP_REFS_$_" = private {{.*}}, section "objc_superrefs"
|
||||||
// CHECK-ELF: @"OBJC_CLASSLIST_REFERENCES_$_" = {{.*}}, section "objc_classrefs"
|
// CHECK-ELF: @OBJC_SELECTOR_REFERENCES_ = private {{.*}}, section "objc_selrefs"
|
||||||
// CHECK-ELF: @"\01l_objc_msgSend_fixup_class" = {{.*}}, section "objc_msgrefs"
|
// CHECK-ELF: @"OBJC_CLASSLIST_REFERENCES_$_" = private {{.*}}, section "objc_classrefs"
|
||||||
|
// CHECK-ELF: @_objc_msgSend_fixup_class = {{.*}}, section "objc_msgrefs"
|
||||||
// CHECK-ELF: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section "objc_protolist"
|
// CHECK-ELF: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section "objc_protolist"
|
||||||
// CHECK-ELF: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section "objc_protorefs"
|
// CHECK-ELF: @"_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section "objc_protorefs"
|
||||||
// CHECK-ELF: @"OBJC_LABEL_CLASS_$" = {{.*}}, section "objc_classlist"
|
// CHECK-ELF: @"OBJC_LABEL_CLASS_$" = private {{.*}}, section "objc_classlist"
|
||||||
// CHECK-ELF: @"OBJC_LABEL_NONLAZY_CLASS_$" = {{.*}}, section "objc_nlclslist"
|
// CHECK-ELF: @"OBJC_LABEL_NONLAZY_CLASS_$" = private {{.*}}, section "objc_nlclslist"
|
||||||
// CHECK-ELF: @"OBJC_LABEL_CATEGORY_$" = {{.*}}, section "objc_catlist"
|
// CHECK-ELF: @"OBJC_LABEL_CATEGORY_$" = private {{.*}}, section "objc_catlist"
|
||||||
// CHECK-ELF: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = {{.*}}, section "objc_nlcatlist"
|
// CHECK-ELF: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = private {{.*}}, section "objc_nlcatlist"
|
||||||
// CHECK-ELF: !{{[0-9]+}} = !{i32 1, !"Objective-C Image Info Section", !"objc_imageinfo"}
|
// CHECK-ELF: !{{[0-9]+}} = !{i32 1, !"Objective-C Image Info Section", !"objc_imageinfo"}
|
||||||
|
|
||||||
// CHECK-MACHO: @"OBJC_CLASSLIST_SUP_REFS_$_" = {{.*}}, section "__DATA,__objc_superrefs,regular,no_dead_strip"
|
// CHECK-MACHO: @"_OBJC_$_CLASS_METHODS_I" = internal {{.*}}, section "__DATA, __objc_const"
|
||||||
// CHECK-MACHO: @OBJC_SELECTOR_REFERENCES_ = {{.*}}, section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
|
// CHECK-MACHO: @"OBJC_CLASSLIST_SUP_REFS_$_" = internal {{.*}}, section "__DATA,__objc_superrefs,regular,no_dead_strip"
|
||||||
// CHECK-MACHO: @"OBJC_CLASSLIST_REFERENCES_$_" = {{.*}}, section "__DATA,__objc_classrefs,regular,no_dead_strip"
|
// CHECK-MACHO: @OBJC_SELECTOR_REFERENCES_ = internal {{.*}}, section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
|
||||||
// CHECK-MACHO: @"\01l_objc_msgSend_fixup_class" = {{.*}}, section "__DATA,__objc_msgrefs,coalesced"
|
// CHECK-MACHO: @"OBJC_CLASSLIST_REFERENCES_$_" = internal {{.*}}, section "__DATA,__objc_classrefs,regular,no_dead_strip"
|
||||||
|
// CHECK-MACHO: @_objc_msgSend_fixup_class = {{.*}}, section "__DATA,__objc_msgrefs,coalesced"
|
||||||
// CHECK-MACHO: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section "__DATA,__objc_protolist,coalesced,no_dead_strip"
|
// CHECK-MACHO: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section "__DATA,__objc_protolist,coalesced,no_dead_strip"
|
||||||
// CHECK-MACHO: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section "__DATA,__objc_protorefs,coalesced,no_dead_strip"
|
// CHECK-MACHO: @"_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section "__DATA,__objc_protorefs,coalesced,no_dead_strip"
|
||||||
// CHECK-MACHO: @"OBJC_LABEL_CLASS_$" = {{.*}}, section "__DATA,__objc_classlist,regular,no_dead_strip"
|
// CHECK-MACHO: @"OBJC_LABEL_CLASS_$" = internal {{.*}}, section "__DATA,__objc_classlist,regular,no_dead_strip"
|
||||||
// CHECK-MACHO: @"OBJC_LABEL_NONLAZY_CLASS_$" = {{.*}}, section "__DATA,__objc_nlclslist,regular,no_dead_strip"
|
// CHECK-MACHO: @"OBJC_LABEL_NONLAZY_CLASS_$" = internal {{.*}}, section "__DATA,__objc_nlclslist,regular,no_dead_strip"
|
||||||
// CHECK-MACHO: @"OBJC_LABEL_CATEGORY_$" = {{.*}}, section "__DATA,__objc_catlist,regular,no_dead_strip"
|
// CHECK-MACHO: @"OBJC_LABEL_CATEGORY_$" = internal {{.*}}, section "__DATA,__objc_catlist,regular,no_dead_strip"
|
||||||
// CHECK-MACHO: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = {{.*}}, section "__DATA,__objc_nlcatlist,regular,no_dead_strip"
|
// CHECK-MACHO: @"OBJC_LABEL_NONLAZY_CATEGORY_$" = internal {{.*}}, section "__DATA,__objc_nlcatlist,regular,no_dead_strip"
|
||||||
// CHECK-MACHO: !{{[0-9]+}} = !{i32 1, !"Objective-C Image Info Section", !"__DATA,__objc_imageinfo,regular,no_dead_strip"}
|
// CHECK-MACHO: !{{[0-9]+}} = !{i32 1, !"Objective-C Image Info Section", !"__DATA,__objc_imageinfo,regular,no_dead_strip"}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
|
// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck -check-prefix=FRAGILE %s
|
||||||
// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s
|
// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck -check-prefix=NONFRAGILE %s
|
||||||
|
|
||||||
// CHECK: @OBJC_SELECTOR_REFERENCES_ = private externally_initialized global
|
// NONFRAGILE: @OBJC_SELECTOR_REFERENCES_ = internal externally_initialized global
|
||||||
|
// FRAGILE: @OBJC_SELECTOR_REFERENCES_ = private externally_initialized global
|
||||||
|
|
||||||
void test(id x) {
|
void test(id x) {
|
||||||
[x doSomething];
|
[x doSomething];
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// CHECK-MODERN: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\01\00"
|
// CHECK-MODERN: @OBJC_CLASS_NAME_{{.*}} = {{.*}} c"\01\00"
|
||||||
// CHECK-MODERN: @"\01l_OBJC_CLASS_RO_$_Foo" = {{.*}} { i32 772
|
// CHECK-MODERN: @"_OBJC_CLASS_RO_$_Foo" = {{.*}} { i32 772
|
||||||
// 772 == 0x304
|
// 772 == 0x304
|
||||||
// ^ HasMRCWeakIvars
|
// ^ HasMRCWeakIvars
|
||||||
// ^ HasCXXDestructorOnly
|
// ^ HasCXXDestructorOnly
|
||||||
|
|
Loading…
Reference in New Issue