Random bug fix related to protocl metadata in categories in
non-fragile abi.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63343 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 09987a2..3f3ea9e 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -3519,13 +3519,14 @@
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] =