Skip to content

Commit ba845de

Browse files
committed
Fix newly introduced warnings in LifetimeDependenceScopeFixup
1 parent 294e4cf commit ba845de

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
@@ -582,6 +582,7 @@ public struct Builder {
582582
return notifyNew(endMutation.getAs(EndCOWMutationInst.self))
583583
}
584584

585+
@discardableResult
585586
public func createEndCOWMutationAddr(address: Value) -> EndCOWMutationAddrInst {
586587
let endMutation = bridged.createEndCOWMutationAddr(address.bridged)
587588
return notifyNew(endMutation.getAs(EndCOWMutationAddrInst.self))

0 commit comments

Comments
 (0)