We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8e1fca commit b52ccceCopy full SHA for b52ccce
include/swift/SIL/ScopedAddressUtils.h
@@ -74,6 +74,15 @@ struct ScopedAddressValue {
74
return kind != ScopedAddressValueKind::Invalid && value;
75
}
76
77
+ // Both the store_borrow source and address operands are effectively used for
78
+ // the duration of the address scope.
79
+ static ScopedAddressValue forUse(Operand *use) {
80
+ if (auto svi = dyn_cast<SingleValueInstruction>(use->getUser()))
81
+ return ScopedAddressValue(svi);
82
+
83
+ return ScopedAddressValue();
84
+ }
85
86
void print(llvm::raw_ostream &os) const;
87
SWIFT_DEBUG_DUMP { print(llvm::dbgs()); }
88
0 commit comments