[cfe-commits] r69305 - in /cfe/trunk: lib/CodeGen/CGObjCMac.cpp test/CodeGenObjC/metadata_symbols.m
Fariborz Jahanian
fjahanian at apple.com
Thu Apr 16 11:34:21 PDT 2009
Author: fjahanian
Date: Thu Apr 16 13:34:20 2009
New Revision: 69305
URL: http://llvm.org/viewvc/llvm-project?rev=69305&view=rev
Log:
Category method synbols must be qualified by gategory name to
match gcc's.
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
cfe/trunk/test/CodeGenObjC/metadata_symbols.m
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=69305&r1=69304&r2=69305&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Thu Apr 16 13:34:20 2009
@@ -3043,6 +3043,12 @@
NameOut += '[';
assert (CD && "Missing container decl in GetNameForMethod");
NameOut += CD->getNameAsString();
+ if (const ObjCCategoryImplDecl *CID =
+ dyn_cast<ObjCCategoryImplDecl>(D->getDeclContext())) {
+ NameOut += '(';
+ NameOut += CID->getNameAsString();
+ NameOut+= ')';
+ }
// FIXME. For a method in a category, (CAT_NAME) is inserted here.
// Right now! there is not enough info. to do this.
NameOut += ' ';
Modified: cfe/trunk/test/CodeGenObjC/metadata_symbols.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/metadata_symbols.m?rev=69305&r1=69304&r2=69305&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/metadata_symbols.m (original)
+++ cfe/trunk/test/CodeGenObjC/metadata_symbols.m Thu Apr 16 13:34:20 2009
@@ -8,8 +8,7 @@
// RUN: grep '@"OBJC_EHTYPE_$_EH3"' %t | count 3 &&
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_" =.*section "__TEXT,__cstring,cstring_literals", align 1' %t | count 1 &&
// RUN: grep -F 'define internal void @"\01-[A im0]"' %t &&
-// FIXME: Should include category name.
-// RUN: grep -F 'define internal void @"\01-[A im1]"' %t &&
+// RUN: grep -F 'define internal void @"\01-[A(Cat) im1]"' %t &&
// RUN: clang-cc -fvisibility=hidden -triple x86_64-apple-darwin9 -emit-llvm -o %t %s &&
@@ -19,8 +18,7 @@
// RUN: grep '@"OBJC_EHTYPE_$_EH2" = external global' %t &&
// RUN: grep '@"OBJC_EHTYPE_$_EH3" = hidden global .*section "__DATA,__objc_const", align 8' %t &&
// RUN: grep -F 'define internal void @"\01-[A im0]"' %t &&
-// FIXME: Should include category name.
-// RUN: grep -F 'define internal void @"\01-[A im1]"' %t &&
+// RUN: grep -F 'define internal void @"\01-[A(Cat) im1]"' %t &&
// RUN: true
More information about the cfe-commits
mailing list