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

Daniel Dunbar daniel at zuster.org
Wed Apr 15 12:03:14 PDT 2009


Author: ddunbar
Date: Wed Apr 15 14:03:14 2009
New Revision: 69198

URL: http://llvm.org/viewvc/llvm-project?rev=69198&view=rev
Log:
Add test case for superrefs section (and make spacing consistent).

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

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Wed Apr 15 14:03:14 2009
@@ -4978,7 +4978,7 @@
   Name += SelName;
   llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name);
   if (!GV) {
-    // Build messafe ref table entry.
+    // Build message ref table entry.
     std::vector<llvm::Constant*> Values(2);
     Values[0] = Fn;
     Values[1] = GetMethodVarName(Sel);
@@ -5087,7 +5087,7 @@
                       CGM.getTargetData().getPrefTypeAlignment(
                                                   ObjCTypes.ClassnfABIPtrTy));
     
-  Entry->setSection("__DATA,__objc_superrefs,regular,no_dead_strip");
+  Entry->setSection("__DATA, __objc_superrefs, regular, no_dead_strip");
   UsedGlobals.push_back(Entry);
   
   return Builder.CreateLoad(Entry, false, "tmp");

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

==============================================================================
--- cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m (original)
+++ cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m Wed Apr 15 14:03:14 2009
@@ -10,6 +10,7 @@
 
 // RUN: grep '@"OBJC_METACLASS_$_A" = global .* section "__DATA, __objc_data", align 8' %t &&
 // RUN: grep '@"\\01L_OBJC_CLASSLIST_REFERENCES_$_[0-9]*" = internal global .* section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8' %t &&
+// RUN: grep '@"\\01L_OBJC_CLASSLIST_SUP_REFS_$_[0-9]*" = internal global .* section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8' %t | count 2 &&
 // RUN: grep '@"\\01L_OBJC_CLASS_NAME_[0-9]*" = internal global .* section "__TEXT,__cstring,cstring_literals", align 1' %t &&
 // RUN: grep '@"\\01L_OBJC_LABEL_CATEGORY_$" = internal global .* section "__DATA, __objc_catlist, regular, no_dead_strip", align 8' %t &&
 // RUN: grep '@"\\01L_OBJC_LABEL_CLASS_$" = internal global .* section "__DATA, __objc_classlist, regular, no_dead_strip", align 8' %t &&
@@ -84,8 +85,21 @@
 }
 @end
 
-void *f0() {
+ at interface D : A
+ at end
+
+ at implementation D
++(void) fm2 {
+  [super fm1];
+}
+-(void) im2 {
+  [super im1];
+}
+ at end
+
+void *f0(id x) {
    [B im0];
    [C im1];
+   [D alloc];
 }
 





More information about the cfe-commits mailing list