]> granicus.if.org Git - clang/commitdiff
Random bug fix related to protocl metadata in categories in
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 29 Jan 2009 23:23:06 +0000 (23:23 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 29 Jan 2009 23:23:06 +0000 (23:23 +0000)
non-fragile abi.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63343 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index 09987a291e8bc2a732650de4210bbe0e492b18d5..3f3ea9e2201daadbda490a9871a7d1fb572f067f 100644 (file)
@@ -3519,13 +3519,14 @@ void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD)
   Values[3] = EmitMethodList(MethodListName, 
                              "__DATA, __objc_const", 
                              Methods);
-  Values[4] = EmitProtocolList("\01l_OBJC_CATEGORY_PROTOCOLS_$_" 
-                               + Interface->getNameAsString(),
-                                Interface->protocol_begin(),
-                                Interface->protocol_end());
-  
   const ObjCCategoryDecl *Category = 
     Interface->FindCategoryDeclaration(OCD->getIdentifier());
+  Values[4] = EmitProtocolList("\01l_OBJC_CATEGORY_PROTOCOLS_$_"
+                               + Interface->getNameAsString() + "_$_"
+                               + Category->getNameAsString(),
+                                Category->protocol_begin(),
+                                Category->protocol_end());
+  
   std::string ExtName(Interface->getNameAsString() + "_$_" +
                       OCD->getNameAsString());
   Values[5] =