Export lazy references of .objc_class_name of class names

referenced in a category implementation meta-data
(Next objc 32bit abi).

llvm-svn: 70407
This commit is contained in:
Fariborz Jahanian 2009-04-29 20:40:05 +00:00
parent 8b171f6516
commit e55f8660be
2 changed files with 7 additions and 0 deletions

View File

@ -1787,6 +1787,7 @@ void CGObjCMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
std::vector<llvm::Constant*> Values(7);
Values[0] = GetClassName(OCD->getIdentifier());
Values[1] = GetClassName(Interface->getIdentifier());
LazySymbols.insert(Interface->getIdentifier());
Values[2] =
EmitMethodList(std::string("\01L_OBJC_CATEGORY_INSTANCE_METHODS_") +
ExtName,

View File

@ -27,6 +27,7 @@
// RUN: grep '@"\\01L_OBJC_SELECTOR_REFERENCES_[0-9]*" = internal global .*section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4' %t &&
// RUN: grep '@"\\01L_OBJC_SYMBOLS" = internal global .*section "__OBJC,__symbols,regular,no_dead_strip", align 4' %t &&
// RUN: grep '@"\\01l_OBJC_$_PROP_LIST_A" = internal global .*section "__OBJC,__property,regular,no_dead_strip", align 4' %t &&
// RUN: grep "\.lazy_reference \.objc_class_name_J0" %t &&
// RUN: true
@ -75,6 +76,11 @@ llvm-gcc -m32 -emit-llvm -S -o - metadata-symbols-32.m | \
}
@end
@interface J0
@end
@implementation J0(Category) @end
void *f0() {
[B im0];
[C im1];