Skip to content

Fix newly introduced warnings in LifetimeDependenceScopeFixup #81297

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

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,7 @@ private func createEndCOWMutationIfNeeded(lifetimeDep: LifetimeDependence, _ con
}
scoped = beginApply
// None of the below cases can generate a mutable address.
case let .owned:
fallthrough
case let .borrowed:
fallthrough
case let .local:
fallthrough
case let .initialized:
fallthrough
case let .caller:
fallthrough
case let .global:
fallthrough
case let .unknown:
case .owned, .borrowed, .local, .initialized, .caller, .global, .unknown:
return
}

Expand Down
1 change: 1 addition & 0 deletions SwiftCompilerSources/Sources/SIL/Builder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ public struct Builder {
return notifyNew(endMutation.getAs(EndCOWMutationInst.self))
}

@discardableResult
public func createEndCOWMutationAddr(address: Value) -> EndCOWMutationAddrInst {
let endMutation = bridged.createEndCOWMutationAddr(address.bridged)
return notifyNew(endMutation.getAs(EndCOWMutationAddrInst.self))
Expand Down