[cfe-commits] r70407 - in /cfe/trunk: lib/CodeGen/CGObjCMac.cpp test/CodeGenObjC/metadata-symbols-32.m

Fariborz Jahanian fjahanian at apple.com
Wed Apr 29 13:40:05 PDT 2009


Author: fjahanian
Date: Wed Apr 29 15:40:05 2009
New Revision: 70407

URL: http://llvm.org/viewvc/llvm-project?rev=70407&view=rev
Log:
Export lazy references of .objc_class_name of class names
referenced in a category implementation meta-data
(Next objc 32bit abi).

Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
    cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=70407&r1=70406&r2=70407&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Wed Apr 29 15:40:05 2009
@@ -1787,6 +1787,7 @@
   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,

Modified: cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m?rev=70407&r1=70406&r2=70407&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m (original)
+++ cfe/trunk/test/CodeGenObjC/metadata-symbols-32.m Wed Apr 29 15:40:05 2009
@@ -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 @@
 }
 @end
 
+ at interface J0
+ at end
+
+ at implementation J0(Category) @end
+
 void *f0() {
    [B im0];
    [C im1];





More information about the cfe-commits mailing list