mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #81223 from atrick/62-missing-markdep
[6.2] Fix LifetimeDependenceInsertion: handle boxed indirect out arguments
This commit is contained in:
@@ -69,13 +69,17 @@ public func consumeAndCreate(_ view: consuming BufferView) -> BufferView {
|
||||
return _overrideLifetime(bv, copying: view)
|
||||
}
|
||||
|
||||
// FIXME: Filed rdar://150398673 ([nonescapable] allocbox-to-stack fails causing lifetime diagnostics to fail)
|
||||
// Remove _overrideLifetime when this is fixed.
|
||||
@inlinable
|
||||
@lifetime(copy this, copy that)
|
||||
public func deriveThisOrThat(_ this: consuming BufferView, _ that: consuming BufferView) -> BufferView {
|
||||
if (Int.random(in: 1..<100) == 0) {
|
||||
return BufferView(this._ptr, this._count)
|
||||
let thisView = BufferView(this._ptr, this._count)
|
||||
return _overrideLifetime(thisView, copying: this)
|
||||
}
|
||||
return BufferView(that._ptr, that._count)
|
||||
let thatView = BufferView(that._ptr, that._count)
|
||||
return _overrideLifetime(thatView, copying: that)
|
||||
}
|
||||
|
||||
public struct Container {
|
||||
|
||||
Reference in New Issue
Block a user