Skip to content

Commit 3c56a7a

Browse files
committed
Bridge hasResultDependsOnSelf()
1 parent 334ede0 commit 3c56a7a

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

SwiftCompilerSources/Sources/SIL/Function.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ final public class Function : CustomStringConvertible, HasShortDescription, Hash
124124
return bridged.hasUnsafeNonEscapableResult()
125125
}
126126

127+
public var hasResultDependsOnSelf: Bool {
128+
return bridged.hasResultDependsOnSelf()
129+
}
130+
127131
/// True if the callee function is annotated with @_semantics("programtermination_point").
128132
/// This means that the function terminates the program.
129133
public var isProgramTerminationPoint: Bool { hasSemanticsAttribute("programtermination_point") }

include/swift/SIL/SILBridging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ struct BridgedFunction {
417417
BRIDGED_INLINE bool isGenericFunction() const;
418418
BRIDGED_INLINE bool hasSemanticsAttr(BridgedStringRef attrName) const;
419419
BRIDGED_INLINE bool hasUnsafeNonEscapableResult() const;
420+
BRIDGED_INLINE bool hasResultDependsOnSelf() const;
420421
BRIDGED_INLINE EffectsKind getEffectAttribute() const;
421422
BRIDGED_INLINE PerformanceConstraints getPerformanceConstraints() const;
422423
BRIDGED_INLINE InlineStrategy getInlineStrategy() const;

include/swift/SIL/SILBridgingImpl.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,7 @@ bool BridgedArgument::hasResultDependsOn() const {
429429
return fArg->hasResultDependsOn();
430430
}
431431

432-
bool BridgedArgument::isReborrow() const {
433-
return getArgument()->isReborrow();
434-
}
432+
bool BridgedArgument::isReborrow() const { return getArgument()->isReborrow(); }
435433

436434
//===----------------------------------------------------------------------===//
437435
// BridgedSubstitutionMap
@@ -587,6 +585,10 @@ bool BridgedFunction::hasUnsafeNonEscapableResult() const {
587585
return getFunction()->hasUnsafeNonEscapableResult();
588586
}
589587

588+
bool BridgedFunction::hasResultDependsOnSelf() const {
589+
return getFunction()->hasResultDependsOnSelf();
590+
}
591+
590592
BridgedFunction::EffectsKind BridgedFunction::getEffectAttribute() const {
591593
return (EffectsKind)getFunction()->getEffectsKind();
592594
}

0 commit comments

Comments
 (0)