Skip to content

Commit 2452cca

Browse files
authored
Merge pull request #15992 from dcci/silprinterdebugbb
2 parents 28a1dc7 + e0f26ad commit 2452cca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/SIL/SILPrinter.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,6 +2216,14 @@ void SILBasicBlock::dump() const {
22162216
/// Pretty-print the SILBasicBlock to the designated stream.
22172217
void SILBasicBlock::print(raw_ostream &OS) const {
22182218
SILPrintContext Ctx(OS);
2219+
2220+
// Print the debug scope (and compute if we didn't do it already).
2221+
auto &SM = this->getParent()->getModule().getASTContext().SourceMgr;
2222+
for (auto &I : *this) {
2223+
SILPrinter P(Ctx);
2224+
P.printDebugScope(I.getDebugScope(), SM);
2225+
}
2226+
22192227
SILPrinter(Ctx).print(this);
22202228
}
22212229

0 commit comments

Comments
 (0)