Skip to content

Commit 65cda30

Browse files
authored
Merge pull request #81298 from meg-gupta/fixwarncp
[6.2] Fix newly introduced warnings in LifetimeDependenceScopeFixup
2 parents 6bbd19a + f9f709b commit 65cda30

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LifetimeDependenceScopeFixup.swift

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -194,19 +194,7 @@ private func createEndCOWMutationIfNeeded(lifetimeDep: LifetimeDependence, _ con
194194
}
195195
scoped = beginApply
196196
// None of the below cases can generate a mutable address.
197-
case let .owned:
198-
fallthrough
199-
case let .borrowed:
200-
fallthrough
201-
case let .local:
202-
fallthrough
203-
case let .initialized:
204-
fallthrough
205-
case let .caller:
206-
fallthrough
207-
case let .global:
208-
fallthrough
209-
case let .unknown:
197+
case .owned, .borrowed, .local, .initialized, .caller, .global, .unknown:
210198
return
211199
}
212200

SwiftCompilerSources/Sources/SIL/Builder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ public struct Builder {
575575
return notifyNew(endMutation.getAs(EndCOWMutationInst.self))
576576
}
577577

578+
@discardableResult
578579
public func createEndCOWMutationAddr(address: Value) -> EndCOWMutationAddrInst {
579580
let endMutation = bridged.createEndCOWMutationAddr(address.bridged)
580581
return notifyNew(endMutation.getAs(EndCOWMutationAddrInst.self))

0 commit comments

Comments
 (0)