Skip to content

Commit 1df1d40

Browse files
committed
Merge 98455 from mainline.
llvm-svn: 99911
1 parent 3a2ed72 commit 1df1d40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/CGObjCGNU.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,8 +1147,8 @@ void CGObjCGNU::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
11471147

11481148
// Collect the names of referenced protocols
11491149
llvm::SmallVector<std::string, 16> Protocols;
1150-
const ObjCInterfaceDecl *ClassDecl = OCD->getClassInterface();
1151-
const ObjCList<ObjCProtocolDecl> &Protos =ClassDecl->getReferencedProtocols();
1150+
const ObjCCategoryDecl *CatDecl = OCD->getCategoryDecl();
1151+
const ObjCList<ObjCProtocolDecl> &Protos = CatDecl->getReferencedProtocols();
11521152
for (ObjCList<ObjCProtocolDecl>::iterator I = Protos.begin(),
11531153
E = Protos.end(); I != E; ++I)
11541154
Protocols.push_back((*I)->getNameAsString());

0 commit comments

Comments
 (0)