mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[embedded] Compile-time (literal) KeyPaths for Embedded Swift
Enable KeyPath/AnyKeyPath/PartialKeyPath/WritableKeyPath in Embedded Swift, but for compile-time use only: - Add keypath optimizations into the mandatory optimizations pipeline - Allow keypath optimizations to look through begin_borrow, to make them work even in OSSA. - If a use of a KeyPath doesn't optimize away, diagnose in PerformanceDiagnostics - Make UnsafePointer.pointer(to:) transparent to allow the keypath optimization to happen in the callers of UnsafePointer.pointer(to:).
This commit is contained in:
@@ -379,6 +379,8 @@ ERROR(embedded_swift_metatype_type,none,
|
||||
"cannot use metatype of type %0 in embedded Swift", (Type))
|
||||
ERROR(embedded_swift_metatype,none,
|
||||
"cannot use metatype in embedded Swift", ())
|
||||
ERROR(embedded_swift_keypath,none,
|
||||
"cannot use key path in embedded Swift", ())
|
||||
ERROR(embedded_swift_allocating_type,none,
|
||||
"cannot use allocating type %0 in -no-allocations mode", (Type))
|
||||
ERROR(embedded_swift_allocating,none,
|
||||
|
||||
Reference in New Issue
Block a user