Skip to content

Commit 334ede0

Browse files
committed
Bridge hasResultDependsOn()
1 parent 1a1a8ec commit 334ede0

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

SwiftCompilerSources/Sources/SIL/Argument.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ final public class FunctionArgument : Argument {
5252
public var isIndirectResult: Bool {
5353
return index < parentFunction.numIndirectResultArguments
5454
}
55+
56+
public var hasResultDependsOn : Bool {
57+
return bridged.hasResultDependsOn()
58+
}
5559
}
5660

5761
public struct Phi {

include/swift/SIL/SILBridging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ struct BridgedArgument {
809809
BRIDGED_INLINE BridgedArgumentConvention getConvention() const;
810810
BRIDGED_INLINE bool isSelf() const;
811811
BRIDGED_INLINE bool isReborrow() const;
812+
BRIDGED_INLINE bool hasResultDependsOn() const;
812813
};
813814

814815
struct OptionalBridgedArgument {

include/swift/SIL/SILBridgingImpl.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ bool BridgedArgument::isSelf() const {
424424
return fArg->isSelf();
425425
}
426426

427+
bool BridgedArgument::hasResultDependsOn() const {
428+
auto *fArg = static_cast<swift::SILFunctionArgument*>(getArgument());
429+
return fArg->hasResultDependsOn();
430+
}
431+
427432
bool BridgedArgument::isReborrow() const {
428433
return getArgument()->isReborrow();
429434
}

0 commit comments

Comments
 (0)