Skip to content

Commit 5df55e4

Browse files
committed
[stats] Add a stats-tracer for type-checking.
1 parent 994ad7a commit 5df55e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3936,6 +3936,10 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
39363936
: TC(TC), IsFirstPass(IsFirstPass), IsSecondPass(IsSecondPass) {}
39373937

39383938
void visit(Decl *decl) {
3939+
UnifiedStatsReporter::FrontendStatsTracer Tracer;
3940+
if (TC.Context.Stats)
3941+
Tracer = TC.Context.Stats->getStatsTracer("type-checking",
3942+
decl->getSourceRange());
39393943
PrettyStackTraceDecl StackTrace("type-checking", decl);
39403944

39413945
DeclVisitor<DeclChecker>::visit(decl);

0 commit comments

Comments
 (0)