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 @@ -177,13 +177,13 @@ struct BorrowingOperand {
177
177
178
178
// / Visit all of the results of the operand's user instruction that are
179
179
// / consuming uses.
180
- void visitUserResultConsumingUses (function_ref<void (Operand *)> visitor);
180
+ void visitUserResultConsumingUses (function_ref<void (Operand *)> visitor) const ;
181
181
182
182
// / Visit all of the "results" of the user of this operand that are borrow
183
183
// / scope introducers for the specific scope that this borrow scope operand
184
184
// / summarizes.
185
185
void
186
- visitBorrowIntroducingUserResults (function_ref<void (BorrowedValue)> visitor);
186
+ visitBorrowIntroducingUserResults (function_ref<void (BorrowedValue)> visitor) const ;
187
187
188
188
// / Passes to visitor all of the consuming uses of this use's using
189
189
// / instruction.
@@ -192,7 +192,7 @@ struct BorrowingOperand {
192
192
// / guaranteed scope by using a worklist and checking if any of the operands
193
193
// / are BorrowScopeOperands.
194
194
void visitConsumingUsesOfBorrowIntroducingUserResults (
195
- function_ref<void (Operand *)> visitor);
195
+ function_ref<void (Operand *)> visitor) const ;
196
196
197
197
void print (llvm::raw_ostream &os) const ;
198
198
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 BorrowingOperandKind::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