File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -178,13 +178,13 @@ struct BorrowingOperand {
178
178
179
179
// / Visit all of the results of the operand's user instruction that are
180
180
// / consuming uses.
181
- void visitUserResultConsumingUses (function_ref<void (Operand *)> visitor);
181
+ void visitUserResultConsumingUses (function_ref<void (Operand *)> visitor) const ;
182
182
183
183
// / Visit all of the "results" of the user of this operand that are borrow
184
184
// / scope introducers for the specific scope that this borrow scope operand
185
185
// / summarizes.
186
186
void
187
- visitBorrowIntroducingUserResults (function_ref<void (BorrowedValue)> visitor);
187
+ visitBorrowIntroducingUserResults (function_ref<void (BorrowedValue)> visitor) const ;
188
188
189
189
// / Passes to visitor all of the consuming uses of this use's using
190
190
// / instruction.
@@ -193,7 +193,7 @@ struct BorrowingOperand {
193
193
// / guaranteed scope by using a worklist and checking if any of the operands
194
194
// / are BorrowScopeOperands.
195
195
void visitConsumingUsesOfBorrowIntroducingUserResults (
196
- function_ref<void (Operand *)> visitor);
196
+ function_ref<void (Operand *)> visitor) const ;
197
197
198
198
void print (llvm::raw_ostream &os) const ;
199
199
SWIFT_DEBUG_DUMP { print (llvm::dbgs ()); }
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ void BorrowingOperand::visitEndScopeInstructions(
190
190
}
191
191
192
192
void BorrowingOperand::visitBorrowIntroducingUserResults (
193
- function_ref<void (BorrowedValue)> visitor) {
193
+ function_ref<void (BorrowedValue)> visitor) const {
194
194
switch (kind) {
195
195
case BorrowScopeOperandKind::BeginApply:
196
196
llvm_unreachable (" Never has borrow introducer results!" );
@@ -212,7 +212,7 @@ void BorrowingOperand::visitBorrowIntroducingUserResults(
212
212
}
213
213
214
214
void BorrowingOperand::visitConsumingUsesOfBorrowIntroducingUserResults (
215
- function_ref<void (Operand *)> func) {
215
+ function_ref<void (Operand *)> func) const {
216
216
// First visit all of the results of our user that are borrow introducing
217
217
// values.
218
218
visitBorrowIntroducingUserResults ([&](BorrowedValue value) {
@@ -238,7 +238,7 @@ void BorrowingOperand::visitConsumingUsesOfBorrowIntroducingUserResults(
238
238
}
239
239
240
240
void BorrowingOperand::visitUserResultConsumingUses (
241
- function_ref<void (Operand *)> visitor) {
241
+ function_ref<void (Operand *)> visitor) const {
242
242
auto *ti = dyn_cast<TermInst>(op->getUser ());
243
243
if (!ti) {
244
244
for (SILValue result : op->getUser ()->getResults ()) {
You can’t perform that action at this time.
0 commit comments