@@ -3359,6 +3359,12 @@ void SILInstruction::dump() const {
33593359 print (llvm::errs ());
33603360}
33613361
3362+ void SILInstruction::dump (bool DebugInfo) const {
3363+ SILPrintContext Ctx (llvm::errs (), /* Verbose*/ false , /* SortedSIL*/ false ,
3364+ DebugInfo, /* PrintFullConvention*/ false );
3365+ SILPrinter (Ctx).print (this );
3366+ }
3367+
33623368void SingleValueInstruction::dump () const {
33633369 SILInstruction::dump ();
33643370}
@@ -3377,6 +3383,13 @@ void SILBasicBlock::dump() const {
33773383 print (llvm::errs ());
33783384}
33793385
3386+ // / Pretty-print the SILBasicBlock to errs with Debug Info.
3387+ void SILBasicBlock::dump (bool DebugInfo) const {
3388+ SILPrintContext Ctx (llvm::errs (), /* Verbose*/ false , /* SortedSIL*/ false ,
3389+ DebugInfo, /* PrintFullConvention*/ false );
3390+ SILPrinter (Ctx).print (this );
3391+ }
3392+
33803393// / Pretty-print the SILBasicBlock to the designated stream.
33813394void SILBasicBlock::print (raw_ostream &OS) const {
33823395 SILPrintContext Ctx (OS);
@@ -3431,6 +3444,13 @@ void SILFunction::dump() const {
34313444 dump (false );
34323445}
34333446
3447+ // / Pretty-print the SILFunction to errs.
3448+ void SILFunction::dump (bool Verbose, bool DebugInfo) const {
3449+ SILPrintContext Ctx (llvm::errs (), Verbose, /* SortedSIL*/ false , DebugInfo,
3450+ /* PrintFullConvention*/ false );
3451+ print (Ctx);
3452+ }
3453+
34343454void SILFunction::dump (const char *FileName) const {
34353455 std::error_code EC;
34363456 llvm::raw_fd_ostream os (FileName, EC, llvm::sys::fs::OpenFlags::OF_None);
@@ -3755,6 +3775,13 @@ void SILModule::dump(bool Verbose) const {
37553775 print (Ctx);
37563776}
37573777
3778+ // / Pretty-print the SILModule to errs with DebugInfo.
3779+ void SILModule::dump (bool Verbose, bool DebugInfo) const {
3780+ SILPrintContext Ctx (llvm::errs (), Verbose, /* SortedSIL*/ false , DebugInfo,
3781+ /* PrintFullConvention*/ false );
3782+ print (Ctx);
3783+ }
3784+
37583785void SILModule::dump (const char *FileName, bool Verbose,
37593786 bool PrintASTDecls) const {
37603787 std::error_code EC;
0 commit comments