@@ -233,52 +233,6 @@ static bool canSkipCircularityCheck(NominalTypeDecl *decl) {
233233 return decl->hasClangNode () || decl->wasDeserialized ();
234234}
235235
236- bool
237- HasCircularInheritanceRequest::evaluate (Evaluator &evaluator,
238- ClassDecl *decl) const {
239- if (canSkipCircularityCheck (decl) || !decl->hasSuperclass ())
240- return false ;
241-
242- auto *superclass = decl->getSuperclassDecl ();
243- auto result = evaluator (HasCircularInheritanceRequest{superclass});
244-
245- // If we have a cycle, handle it and return true.
246- if (!result) {
247- using Error = CyclicalRequestError<HasCircularInheritanceRequest>;
248- llvm::handleAllErrors (result.takeError (), [](const Error &E) {});
249- return true ;
250- }
251- return result.get ();
252- }
253-
254- bool
255- HasCircularInheritedProtocolsRequest::evaluate (Evaluator &evaluator,
256- ProtocolDecl *decl) const {
257- if (canSkipCircularityCheck (decl))
258- return false ;
259-
260- bool anyObject = false ;
261- auto inherited = getDirectlyInheritedNominalTypeDecls (decl, anyObject);
262- for (auto &found : inherited) {
263- auto *protoDecl = dyn_cast<ProtocolDecl>(found.Item );
264- if (!protoDecl)
265- continue ;
266-
267- // If we have a cycle, handle it and return true.
268- auto result = evaluator (HasCircularInheritedProtocolsRequest{protoDecl});
269- if (!result) {
270- using Error = CyclicalRequestError<HasCircularInheritedProtocolsRequest>;
271- llvm::handleAllErrors (result.takeError (), [](const Error &E) {});
272- return true ;
273- }
274-
275- // If the underlying request handled a cycle and returned true, bail.
276- if (*result)
277- return true ;
278- }
279- return false ;
280- }
281-
282236bool
283237HasCircularRawValueRequest::evaluate (Evaluator &evaluator,
284238 EnumDecl *decl) const {
0 commit comments