Skip to content

Commit 059f730

Browse files
authored
[AST] NFC: Pretty stack trace for Traversal::visitNominalTypeDecl
This helps a bit in getting more readable stack traces when the compiler crashes.
1 parent c0e652b commit 059f730

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/AST/ASTWalker.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ class Traversal : public ASTVisitor<Traversal, Expr*, Stmt*,
284284
}
285285

286286
bool visitNominalTypeDecl(NominalTypeDecl *NTD) {
287+
#ifndef NDEBUG
288+
PrettyStackTraceDecl debugStack("walking into", NTD);
289+
#endif
287290

288291
bool WalkGenerics = visitGenericParamListIfNeeded(NTD);
289292

0 commit comments

Comments
 (0)