[Gardening] Canonicalize usages of ASTContext::Stats

This commit is contained in:
Robert Widmann
2020-02-27 16:04:00 -08:00
parent ccf472d158
commit de72824b04
22 changed files with 65 additions and 45 deletions

View File

@@ -1312,9 +1312,10 @@ void ConstraintGraph::optimize() {
void ConstraintGraph::incrementConstraintsPerContractionCounter() {
SWIFT_FUNC_STAT;
auto &context = CS.getASTContext();
if (context.Stats)
context.Stats->getFrontendCounters()
if (auto *Stats = context.Stats) {
Stats->getFrontendCounters()
.NumConstraintsConsideredForEdgeContraction++;
}
}
#pragma mark Debugging output