-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ASTGen] Generate AutoDiff attributes #79808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux |
include/swift/AST/ASTBridging.h
Outdated
@@ -879,6 +942,30 @@ BridgedCustomAttr BridgedCustomAttr_createParsed( | |||
BridgedNullableCustomAttributeInitializer cInitContext, | |||
BridgedNullableArgumentList cArgumentList); | |||
|
|||
SWIFT_NAME("BridgedDerivativeAttr.createParsed(_:atLoc:range:baseType:" | |||
"orignalName:originalNameLoc:accessorKind:params:)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"orignalName:originalNameLoc:accessorKind:params:)") | |
"originalName:originalNameLoc:accessorKind:params:)") |
include/swift/AST/ASTBridging.h
Outdated
BridgedDerivativeAttr BridgedDerivativeAttr_createParsed( | ||
BridgedASTContext cContext, BridgedSourceLoc cAtLoc, | ||
BridgedSourceRange cRange, BridgedNullableTypeRepr cBaseType, | ||
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOrignalNameLoc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOrignalNameLoc, | |
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOriginalNameLoc, |
include/swift/AST/ASTBridging.h
Outdated
BridgedAccessorKind cAccessorKind, BridgedArrayRef cParams); | ||
|
||
SWIFT_NAME("BridgedDerivativeAttr.createParsed(_:atLoc:range:baseType:" | ||
"orignalName:originalNameLoc:params:)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"orignalName:originalNameLoc:params:)") | |
"originalName:originalNameLoc:params:)") |
include/swift/AST/ASTBridging.h
Outdated
BridgedDerivativeAttr BridgedDerivativeAttr_createParsed( | ||
BridgedASTContext cContext, BridgedSourceLoc cAtLoc, | ||
BridgedSourceRange cRange, BridgedNullableTypeRepr cBaseType, | ||
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOrignalNameLoc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOrignalNameLoc, | |
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOriginalNameLoc, |
include/swift/AST/ASTBridging.h
Outdated
@@ -1260,6 +1347,15 @@ BridgedSILGenNameAttr BridgedSILGenNameAttr_createParsed( | |||
BridgedASTContext cContext, BridgedSourceLoc cAtLoc, | |||
BridgedSourceRange cRange, BridgedStringRef cName, bool isRaw); | |||
|
|||
SWIFT_NAME( | |||
"BridgedTransposeAttr.createParsed(_:atLoc:range:baseType:orignalName:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"BridgedTransposeAttr.createParsed(_:atLoc:range:baseType:orignalName:" | |
"BridgedTransposeAttr.createParsed(_:atLoc:range:baseType:originalName:" |
include/swift/AST/ASTBridging.h
Outdated
BridgedTransposeAttr BridgedTransposeAttr_createParsed( | ||
BridgedASTContext cContext, BridgedSourceLoc cAtLoc, | ||
BridgedSourceRange cRange, BridgedNullableTypeRepr cBaseType, | ||
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOrignalNameLoc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOrignalNameLoc, | |
BridgedDeclNameRef cOriginalName, BridgedDeclNameLoc cOriginalNameLoc, |
@@ -553,6 +553,176 @@ extension ASTGenVisitor { | |||
) | |||
} | |||
|
|||
struct GeneratedDerivativeOrignalDecl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct GeneratedDerivativeOrignalDecl { | |
struct GeneratedDerivativeOriginalDecl { |
`@differentiable`, `@derivative` and `@transpose`
@swift-ci Please smoke test |
swiftlang/swift-testing#1002 |
|
||
// RUN: %target-typecheck-verify-swift | ||
|
||
import _Differentiation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test might want to add REQUIRED: differentiable_programming
or be moved into the test/AutoDiff/
directory.
@differentiable
,@derivative
and@transpose