@@ -1208,11 +1208,6 @@ static bool hasLessAccessibleSetter(const AbstractStorageDecl *ASD) {
12081208 return ASD->getSetterFormalAccess () < ASD->getFormalAccess ();
12091209}
12101210
1211- static bool isImplicitRethrowsProtocol (const ProtocolDecl *proto) {
1212- return proto->isSpecificProtocol (KnownProtocolKind::AsyncSequence) ||
1213- proto->isSpecificProtocol (KnownProtocolKind::AsyncIteratorProtocol);
1214- }
1215-
12161211void PrintAST::printAttributes (const Decl *D) {
12171212 if (Options.SkipAttributes )
12181213 return ;
@@ -1223,17 +1218,6 @@ void PrintAST::printAttributes(const Decl *D) {
12231218
12241219 auto attrs = D->getAttrs ();
12251220
1226- // When printing a Swift interface, make sure that older compilers see
1227- // @rethrows on the AsyncSequence and AsyncIteratorProtocol.
1228- if (Options.AsyncSequenceRethrows && Options.IsForSwiftInterface ) {
1229- if (auto proto = dyn_cast<ProtocolDecl>(D)) {
1230- if (isImplicitRethrowsProtocol (proto)) {
1231- Printer << " @rethrows" ;
1232- Printer.printNewline ();
1233- }
1234- }
1235- }
1236-
12371221 // Save the current number of exclude attrs to restore once we're done.
12381222 unsigned originalExcludeAttrCount = Options.ExcludeAttrList .size ();
12391223
@@ -3067,12 +3051,6 @@ static void suppressingFeaturePrimaryAssociatedTypes2(PrintOptions &options,
30673051 options.PrintPrimaryAssociatedTypes = originalPrintPrimaryAssociatedTypes;
30683052}
30693053
3070- static void
3071- suppressingFeatureAsyncSequenceFailure (
3072- PrintOptions &options, llvm::function_ref<void ()> action) {
3073- llvm::SaveAndRestore<bool > saved (options.AsyncSequenceRethrows , true );
3074- action ();
3075- }
30763054static void
30773055suppressingFeatureLexicalLifetimes (PrintOptions &options,
30783056 llvm::function_ref<void ()> action) {
0 commit comments