Skip to content

Commit 0f12958

Browse files
authored
Merge pull request #78648 from atrick/cleanup-test
[NFC] cleanup test/SILOptimizer/addressable_dependencies.swift
2 parents e0b2197 + 9f0ee6d commit 0f12958

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/SILOptimizer/addressable_dependencies.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-sil -disable-access-control -enable-experimental-feature BuiltinModule -enable-experimental-feature LifetimeDependence -enable-experimental-feature AddressableTypes -enable-experimental-feature ValueGenerics %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -emit-sil -enable-experimental-feature BuiltinModule -enable-experimental-feature LifetimeDependence -enable-experimental-feature AddressableTypes -enable-experimental-feature ValueGenerics %s | %FileCheck %s
22

33
// REQUIRES: swift_feature_BuiltinModule
44
// REQUIRES: swift_feature_AddressableTypes
@@ -7,6 +7,14 @@
77

88
import Builtin
99

10+
// Copied from the stdlib until we have Builtin.overrideLifetime.
11+
@_unsafeNonescapableResult
12+
@lifetime(borrow source)
13+
internal func _overrideLifetime<T: ~Copyable & ~Escapable, U: ~Copyable & ~Escapable>(
14+
_ dependent: consuming T, borrowing source: borrowing U) -> T {
15+
dependent
16+
}
17+
1018
struct NodeRef: ~Escapable {
1119
private var parent: UnsafePointer<Node>
1220

0 commit comments

Comments
 (0)