From a5ff0ee6fa691ae64e86a53d2eb052afb8435972 Mon Sep 17 00:00:00 2001 From: Dan Zheng Date: Sat, 16 Nov 2019 02:11:01 +0000 Subject: [PATCH 1/2] [AutoDiff] Update API/ABI status for attributes. `@differentiating` and `@transposing` are: - API/ABI stable to add. (The declaration is unaffected.) - API/ABI breaking to remove. `@noDerivative` is API/ABI breaking to add/remove. Adding/removing the attribute changes derivative code behavior. --- include/swift/AST/Attr.def | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/swift/AST/Attr.def b/include/swift/AST/Attr.def index c6ba3783a675c..327322f82face 100644 --- a/include/swift/AST/Attr.def +++ b/include/swift/AST/Attr.def @@ -510,7 +510,7 @@ DECL_ATTR(differentiable, Differentiable, 90) DECL_ATTR(differentiating, Differentiating, OnFunc | LongAttribute | AllowMultipleAttributes | - ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove | + ABIStableToAdd | ABIBreakingToRemove | APIStableToAdd | APIBreakingToRemove | NotSerialized, 91) SIMPLE_DECL_ATTR(compilerEvaluable, CompilerEvaluable, OnAccessor | OnFunc | OnConstructor | OnSubscript | @@ -518,11 +518,11 @@ SIMPLE_DECL_ATTR(compilerEvaluable, CompilerEvaluable, NotSerialized, 92) SIMPLE_DECL_ATTR(noDerivative, NoDerivative, OnVar | - ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove, + ABIBreakingToAdd | ABIBreakingToRemove | APIBreakingToAdd | APIBreakingToRemove, 93) DECL_ATTR(transposing, Transposing, OnFunc | LongAttribute | AllowMultipleAttributes | - ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove | + ABIStableToAdd | ABIBreakingToRemove | APIStableToAdd | APIBreakingToRemove | NotSerialized, 94) SIMPLE_DECL_ATTR(IBSegueAction, IBSegueAction, From c377a16db67b0475cc03e4f10986c58ec2245e31 Mon Sep 17 00:00:00 2001 From: Dan Zheng Date: Thu, 21 Nov 2019 10:07:28 -0800 Subject: [PATCH 2/2] Update API/ABI status for `@noDerivative`. --- include/swift/AST/Attr.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/AST/Attr.def b/include/swift/AST/Attr.def index f70c023dad226..f5e2c739bfbfd 100644 --- a/include/swift/AST/Attr.def +++ b/include/swift/AST/Attr.def @@ -522,7 +522,7 @@ SIMPLE_DECL_ATTR(compilerEvaluable, CompilerEvaluable, NotSerialized, 93) SIMPLE_DECL_ATTR(noDerivative, NoDerivative, OnVar | - ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove, + ABIBreakingToAdd | ABIBreakingToRemove | APIBreakingToAdd | APIBreakingToRemove, 94) DECL_ATTR(transposing, Transposing, OnFunc | LongAttribute | AllowMultipleAttributes |