@@ -236,9 +236,12 @@ struct BorrowScopeOperandKind {
236236 }
237237
238238 void print (llvm::raw_ostream &os) const ;
239- SWIFT_DEBUG_DUMP;
239+ SWIFT_DEBUG_DUMP { print ( llvm::dbgs ()); }
240240};
241241
242+ llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
243+ BorrowScopeOperandKind kind);
244+
242245// / An operand whose user instruction introduces a new borrow scope for the
243246// / operand's value. The value of the operand must be considered as implicitly
244247// / borrowed until the user's corresponding end scope instruction.
@@ -278,6 +281,9 @@ struct BorrowScopeOperand {
278281 llvm_unreachable (" Covered switch isn't covered" );
279282 }
280283
284+ void print (llvm::raw_ostream &os) const ;
285+ SWIFT_DEBUG_DUMP { print (llvm::dbgs ()); }
286+
281287private:
282288 // / Internal constructor for failable static constructor. Please do not expand
283289 // / its usage since it assumes the code passed in is well formed.
@@ -286,7 +292,7 @@ struct BorrowScopeOperand {
286292};
287293
288294llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
289- BorrowScopeOperandKind kind );
295+ const BorrowScopeOperand &operand );
290296
291297struct BorrowScopeIntroducingValueKind {
292298 using UnderlyingKindTy = std::underlying_type<ValueKind>::type;
@@ -336,7 +342,7 @@ struct BorrowScopeIntroducingValueKind {
336342 }
337343
338344 void print (llvm::raw_ostream &os) const ;
339- SWIFT_DEBUG_DUMP;
345+ SWIFT_DEBUG_DUMP { print ( llvm::dbgs ()); }
340346};
341347
342348llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
@@ -419,6 +425,9 @@ struct BorrowScopeIntroducingValue {
419425 SmallPtrSetImpl<SILBasicBlock *> &visitedBlocks,
420426 DeadEndBlocks &deadEndBlocks) const ;
421427
428+ void print (llvm::raw_ostream &os) const ;
429+ SWIFT_DEBUG_DUMP { print (llvm::dbgs ()); }
430+
422431private:
423432 // / Internal constructor for failable static constructor. Please do not expand
424433 // / its usage since it assumes the code passed in is well formed.
@@ -427,6 +436,9 @@ struct BorrowScopeIntroducingValue {
427436 : kind(kind), value(value) {}
428437};
429438
439+ llvm::raw_ostream &operator <<(llvm::raw_ostream &os,
440+ const BorrowScopeIntroducingValue &value);
441+
430442// / Look up through the def-use chain of \p inputValue, recording any "borrow"
431443// / introducing values that we find into \p out. If at any point, we find a
432444// / point in the chain we do not understand, we bail and return false. If we are
0 commit comments