Make sure the class methods get attached to the metaclass object.

Need to query the implementation, not the interface...

llvm-svn: 44633
This commit is contained in:
Steve Naroff 2007-12-05 21:49:40 +00:00
parent 68d232b477
commit ff9f8efe4d
1 changed files with 2 additions and 2 deletions

View File

@ -2097,9 +2097,9 @@ void RewriteTest::RewriteObjcClassMetaData(ObjcImplementationDecl *IDecl,
// Set 'ivars' field for root class to 0. Objc1 runtime does not use it.
// 'info' field is initialized to CLS_META(2) for metaclass
Result += ", 0,2, sizeof(struct _objc_class), 0";
if (CDecl->getNumClassMethods() > 0) {
if (IDecl->getNumClassMethods() > 0) {
Result += "\n\t, &_OBJC_CLASS_METHODS_";
Result += CDecl->getName();
Result += IDecl->getName();
Result += "\n";
}
else