@@ -3359,6 +3359,12 @@ void SILInstruction::dump() const {
3359
3359
print (llvm::errs ());
3360
3360
}
3361
3361
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
+
3362
3368
void SingleValueInstruction::dump () const {
3363
3369
SILInstruction::dump ();
3364
3370
}
@@ -3377,6 +3383,13 @@ void SILBasicBlock::dump() const {
3377
3383
print (llvm::errs ());
3378
3384
}
3379
3385
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
+
3380
3393
// / Pretty-print the SILBasicBlock to the designated stream.
3381
3394
void SILBasicBlock::print (raw_ostream &OS) const {
3382
3395
SILPrintContext Ctx (OS);
@@ -3431,6 +3444,13 @@ void SILFunction::dump() const {
3431
3444
dump (false );
3432
3445
}
3433
3446
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
+
3434
3454
void SILFunction::dump (const char *FileName) const {
3435
3455
std::error_code EC;
3436
3456
llvm::raw_fd_ostream os (FileName, EC, llvm::sys::fs::OpenFlags::OF_None);
@@ -3755,6 +3775,13 @@ void SILModule::dump(bool Verbose) const {
3755
3775
print (Ctx);
3756
3776
}
3757
3777
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
+
3758
3785
void SILModule::dump (const char *FileName, bool Verbose,
3759
3786
bool PrintASTDecls) const {
3760
3787
std::error_code EC;
0 commit comments