File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed
Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -518,13 +518,13 @@ public SwiftObjectHeader {
518518
519519#ifndef NDEBUG
520520 // / Print the ID of the block, bbN.
521- void dumpID () const ;
521+ void dumpID (bool newline = true ) const ;
522522
523523 // / Print the ID of the block with \p OS, bbN.
524- void printID (llvm::raw_ostream &OS) const ;
524+ void printID (llvm::raw_ostream &OS, bool newline = true ) const ;
525525
526526 // / Print the ID of the block with \p Ctx, bbN.
527- void printID (SILPrintContext &Ctx) const ;
527+ void printID (SILPrintContext &Ctx, bool newline = true ) const ;
528528#endif
529529
530530 // / getSublistAccess() - returns pointer to member of instruction list
Original file line number Diff line number Diff line change @@ -853,8 +853,11 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
853853 }
854854
855855#ifndef NDEBUG
856- void printID (const SILBasicBlock *BB) {
857- *this << Ctx.getID (BB) << " \n " ;
856+ void printID (const SILBasicBlock *BB, bool newline) {
857+ *this << Ctx.getID (BB);
858+ if (newline) {
859+ *this << " \n " ;
860+ }
858861 }
859862#endif
860863
@@ -3115,17 +3118,17 @@ void SILBasicBlock::print(SILPrintContext &Ctx) const {
31153118}
31163119
31173120#ifndef NDEBUG
3118- void SILBasicBlock::dumpID () const {
3119- printID (llvm::errs ());
3121+ void SILBasicBlock::dumpID (bool newline ) const {
3122+ printID (llvm::errs (), newline );
31203123}
31213124
3122- void SILBasicBlock::printID (llvm::raw_ostream &OS) const {
3125+ void SILBasicBlock::printID (llvm::raw_ostream &OS, bool newline ) const {
31233126 SILPrintContext Ctx (OS);
3124- printID (Ctx);
3127+ printID (Ctx, newline );
31253128}
31263129
3127- void SILBasicBlock::printID (SILPrintContext &Ctx) const {
3128- SILPrinter (Ctx).printID (this );
3130+ void SILBasicBlock::printID (SILPrintContext &Ctx, bool newline ) const {
3131+ SILPrinter (Ctx).printID (this , newline );
31293132}
31303133#endif
31313134
You can’t perform that action at this time.
0 commit comments