@@ -3336,6 +3336,12 @@ void SILInstruction::dump() const {
33363336 print (llvm::errs ());
33373337}
33383338
3339+ void SILInstruction::dump (bool DebugInfo) const {
3340+ SILPrintContext Ctx (llvm::errs (), /* Verbose*/ false , /* SortedSIL*/ false ,
3341+ DebugInfo, /* PrintFullConvention*/ false );
3342+ SILPrinter (Ctx).print (this );
3343+ }
3344+
33393345void SingleValueInstruction::dump () const {
33403346 SILInstruction::dump ();
33413347}
@@ -3354,6 +3360,13 @@ void SILBasicBlock::dump() const {
33543360 print (llvm::errs ());
33553361}
33563362
3363+ // / Pretty-print the SILBasicBlock to errs with Debug Info.
3364+ void SILBasicBlock::dump (bool DebugInfo) const {
3365+ SILPrintContext Ctx (llvm::errs (), /* Verbose*/ false , /* SortedSIL*/ false ,
3366+ DebugInfo, /* PrintFullConvention*/ false );
3367+ SILPrinter (Ctx).print (this );
3368+ }
3369+
33573370// / Pretty-print the SILBasicBlock to the designated stream.
33583371void SILBasicBlock::print (raw_ostream &OS) const {
33593372 SILPrintContext Ctx (OS);
@@ -3408,6 +3421,13 @@ void SILFunction::dump() const {
34083421 dump (false );
34093422}
34103423
3424+ // / Pretty-print the SILFunction to errs.
3425+ void SILFunction::dump (bool Verbose, bool DebugInfo) const {
3426+ SILPrintContext Ctx (llvm::errs (), Verbose, /* SortedSIL*/ false , DebugInfo,
3427+ /* PrintFullConvention*/ false );
3428+ print (Ctx);
3429+ }
3430+
34113431void SILFunction::dump (const char *FileName) const {
34123432 std::error_code EC;
34133433 llvm::raw_fd_ostream os (FileName, EC, llvm::sys::fs::OpenFlags::OF_None);
@@ -3732,6 +3752,13 @@ void SILModule::dump(bool Verbose) const {
37323752 print (Ctx);
37333753}
37343754
3755+ // / Pretty-print the SILModule to errs with DebugInfo.
3756+ void SILModule::dump (bool Verbose, bool DebugInfo) const {
3757+ SILPrintContext Ctx (llvm::errs (), Verbose, /* SortedSIL*/ false , DebugInfo,
3758+ /* PrintFullConvention*/ false );
3759+ print (Ctx);
3760+ }
3761+
37353762void SILModule::dump (const char *FileName, bool Verbose,
37363763 bool PrintASTDecls) const {
37373764 std::error_code EC;
0 commit comments