Skip to content

Commit 0f55220

Browse files
committed
SIL: add var FullApplySite.singleDirectErrorResult
1 parent 5016e35 commit 0f55220

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

SwiftCompilerSources/Sources/SIL/ApplySite.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ extension ApplySite {
296296

297297
public protocol FullApplySite : ApplySite {
298298
var singleDirectResult: Value? { get }
299+
var singleDirectErrorResult: Value? { get }
299300
}
300301

301302
extension FullApplySite {

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,7 @@ final public class ApplyInst : SingleValueInstruction, FullApplySite {
12051205
public var numArguments: Int { bridged.ApplyInst_numArguments() }
12061206

12071207
public var singleDirectResult: Value? { self }
1208+
public var singleDirectErrorResult: Value? { nil }
12081209

12091210
public var isNonThrowing: Bool { bridged.ApplyInst_getNonThrowing() }
12101211
public var isNonAsync: Bool { bridged.ApplyInst_getNonAsync() }
@@ -1478,6 +1479,7 @@ final public class BeginApplyInst : MultipleValueInstruction, FullApplySite {
14781479
public var numArguments: Int { bridged.BeginApplyInst_numArguments() }
14791480

14801481
public var singleDirectResult: Value? { nil }
1482+
public var singleDirectErrorResult: Value? { nil }
14811483

14821484
public var token: Value { getResult(index: resultCount - 1) }
14831485

@@ -1637,6 +1639,7 @@ final public class TryApplyInst : TermInst, FullApplySite {
16371639
public var errorBlock: BasicBlock { successors[1] }
16381640

16391641
public var singleDirectResult: Value? { normalBlock.arguments[0] }
1642+
public var singleDirectErrorResult: Value? { errorBlock.arguments[0] }
16401643

16411644
public var isNonAsync: Bool { bridged.TryApplyInst_getNonAsync() }
16421645
public var specializationInfo: ApplyInst.SpecializationInfo { bridged.TryApplyInst_getSpecializationInfo() }

0 commit comments

Comments
 (0)