diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index bcefaeb1f607..2ee479fd8a90 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -1109,6 +1109,7 @@ public: void Profile(llvm::FoldingSetNodeID &ID); static void Profile(llvm::FoldingSetNodeID &ID, + const ObjCInterfaceDecl *Decl, ObjCProtocolDecl **protocols, unsigned NumProtocols); static bool classof(const Type *T) { diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index f80f3641da02..637061c499bf 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -704,14 +704,16 @@ void FunctionTypeProto::Profile(llvm::FoldingSetNodeID &ID) { } void ObjCQualifiedInterfaceType::Profile(llvm::FoldingSetNodeID &ID, + const ObjCInterfaceDecl *Decl, ObjCProtocolDecl **protocols, unsigned NumProtocols) { + ID.AddPointer(Decl); for (unsigned i = 0; i != NumProtocols; i++) ID.AddPointer(protocols[i]); } void ObjCQualifiedInterfaceType::Profile(llvm::FoldingSetNodeID &ID) { - Profile(ID, &Protocols[0], getNumProtocols()); + Profile(ID, getDecl(), &Protocols[0], getNumProtocols()); } void ObjCQualifiedIdType::Profile(llvm::FoldingSetNodeID &ID,