Merge pull request #30109 from CodaFi/lies-more-lies-and-statistics

[Frontend] Clean Up Usage of UnifiedStatsReporter
This commit is contained in:
Robert Widmann
2020-02-28 10:24:02 -08:00
committed by GitHub
28 changed files with 234 additions and 179 deletions

View File

@@ -91,13 +91,13 @@ ConstraintSystem::~ConstraintSystem() {
void ConstraintSystem::incrementScopeCounter() {
CountScopes++;
// FIXME: (transitional) increment the redundant "always-on" counter.
if (getASTContext().Stats)
getASTContext().Stats->getFrontendCounters().NumConstraintScopes++;
if (auto *Stats = getASTContext().Stats)
Stats->getFrontendCounters().NumConstraintScopes++;
}
void ConstraintSystem::incrementLeafScopes() {
if (getASTContext().Stats)
getASTContext().Stats->getFrontendCounters().NumLeafScopes++;
if (auto *Stats = getASTContext().Stats)
Stats->getFrontendCounters().NumLeafScopes++;
}
bool ConstraintSystem::hasFreeTypeVariables() {