@@ -236,9 +236,12 @@ struct BorrowScopeOperandKind {
236
236
}
237
237
238
238
void print (llvm::raw_ostream &os) const ;
239
- SWIFT_DEBUG_DUMP;
239
+ SWIFT_DEBUG_DUMP { print ( llvm::dbgs ()); }
240
240
};
241
241
242
+ llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
243
+ BorrowScopeOperandKind kind);
244
+
242
245
// / An operand whose user instruction introduces a new borrow scope for the
243
246
// / operand's value. The value of the operand must be considered as implicitly
244
247
// / borrowed until the user's corresponding end scope instruction.
@@ -278,6 +281,9 @@ struct BorrowScopeOperand {
278
281
llvm_unreachable (" Covered switch isn't covered" );
279
282
}
280
283
284
+ void print (llvm::raw_ostream &os) const ;
285
+ SWIFT_DEBUG_DUMP { print (llvm::dbgs ()); }
286
+
281
287
private:
282
288
// / Internal constructor for failable static constructor. Please do not expand
283
289
// / its usage since it assumes the code passed in is well formed.
@@ -286,7 +292,7 @@ struct BorrowScopeOperand {
286
292
};
287
293
288
294
llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
289
- BorrowScopeOperandKind kind );
295
+ const BorrowScopeOperand &operand );
290
296
291
297
struct BorrowScopeIntroducingValueKind {
292
298
using UnderlyingKindTy = std::underlying_type<ValueKind>::type;
@@ -336,7 +342,7 @@ struct BorrowScopeIntroducingValueKind {
336
342
}
337
343
338
344
void print (llvm::raw_ostream &os) const ;
339
- SWIFT_DEBUG_DUMP;
345
+ SWIFT_DEBUG_DUMP { print ( llvm::dbgs ()); }
340
346
};
341
347
342
348
llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
@@ -419,6 +425,9 @@ struct BorrowScopeIntroducingValue {
419
425
SmallPtrSetImpl<SILBasicBlock *> &visitedBlocks,
420
426
DeadEndBlocks &deadEndBlocks) const ;
421
427
428
+ void print (llvm::raw_ostream &os) const ;
429
+ SWIFT_DEBUG_DUMP { print (llvm::dbgs ()); }
430
+
422
431
private:
423
432
// / Internal constructor for failable static constructor. Please do not expand
424
433
// / its usage since it assumes the code passed in is well formed.
@@ -427,6 +436,9 @@ struct BorrowScopeIntroducingValue {
427
436
: kind(kind), value(value) {}
428
437
};
429
438
439
+ llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
440
+ const BorrowScopeIntroducingValue &value);
441
+
430
442
// / Look up through the def-use chain of \p inputValue, recording any "borrow"
431
443
// / introducing values that we find into \p out. If at any point, we find a
432
444
// / point in the chain we do not understand, we bail and return false. If we are
0 commit comments