@@ -3336,6 +3336,12 @@ void SILInstruction::dump() const {
3336
3336
print (llvm::errs ());
3337
3337
}
3338
3338
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
+
3339
3345
void SingleValueInstruction::dump () const {
3340
3346
SILInstruction::dump ();
3341
3347
}
@@ -3354,6 +3360,13 @@ void SILBasicBlock::dump() const {
3354
3360
print (llvm::errs ());
3355
3361
}
3356
3362
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
+
3357
3370
// / Pretty-print the SILBasicBlock to the designated stream.
3358
3371
void SILBasicBlock::print (raw_ostream &OS) const {
3359
3372
SILPrintContext Ctx (OS);
@@ -3408,6 +3421,13 @@ void SILFunction::dump() const {
3408
3421
dump (false );
3409
3422
}
3410
3423
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
+
3411
3431
void SILFunction::dump (const char *FileName) const {
3412
3432
std::error_code EC;
3413
3433
llvm::raw_fd_ostream os (FileName, EC, llvm::sys::fs::OpenFlags::OF_None);
@@ -3732,6 +3752,13 @@ void SILModule::dump(bool Verbose) const {
3732
3752
print (Ctx);
3733
3753
}
3734
3754
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
+
3735
3762
void SILModule::dump (const char *FileName, bool Verbose,
3736
3763
bool PrintASTDecls) const {
3737
3764
std::error_code EC;
0 commit comments