From: Fariborz Jahanian Date: Wed, 29 Apr 2009 20:40:05 +0000 (+0000) Subject: Export lazy references of .objc_class_name of class names X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=679cd7fcbd341fa3747e598f537601db421b1002;p=clang Export lazy references of .objc_class_name of class names referenced in a category implementation meta-data (Next objc 32bit abi). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70407 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 5b1a082ba2..cae17cfdb1 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -1787,6 +1787,7 @@ void CGObjCMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) { std::vector 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, diff --git a/test/CodeGenObjC/metadata-symbols-32.m b/test/CodeGenObjC/metadata-symbols-32.m index 867dfca684..8cebe4976e 100644 --- a/test/CodeGenObjC/metadata-symbols-32.m +++ b/test/CodeGenObjC/metadata-symbols-32.m @@ -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];