Skip to content

Commit 121b2fa

Browse files
committed
[NFC] SIL: Add ValueBase::isBeginApplyToken.
Forwards to the member function of the same name on MultipleValueInstructionResult.
1 parent a31d15c commit 121b2fa

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/swift/SIL/SILValue.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,8 @@ class ValueBase : public SILNode, public SILAllocated<ValueBase> {
590590

591591
bool isGuaranteedForwarding() const;
592592

593+
bool isBeginApplyToken() const;
594+
593595
/// Unsafely eliminate moveonly from this value's type. Returns true if the
594596
/// value's underlying type was move only and thus was changed. Returns false
595597
/// otherwise.

lib/SIL/IR/SILValue.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ bool ValueBase::isGuaranteedForwarding() const {
191191
return phi->isGuaranteedForwarding();
192192
}
193193

194+
bool ValueBase::isBeginApplyToken() const {
195+
auto *result = isaResultOf<BeginApplyInst>(this);
196+
if (!result)
197+
return false;
198+
return result->isBeginApplyToken();
199+
}
200+
194201
bool ValueBase::hasDebugTrace() const {
195202
for (auto *op : getUses()) {
196203
if (auto *debugValue = dyn_cast<DebugValueInst>(op->getUser())) {

0 commit comments

Comments
 (0)