diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-03-05 21:42:49 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-03-05 21:42:49 +0000 |
commit | 02892a65b18875a04c7ed5eadb3a13be801ab477 (patch) | |
tree | 2039a115887a751e12e83cf7229af194c4017e21 /lib/AST/Stmt.cpp | |
parent | 7034fb6c7be710883a970f82cb2da97bf1cf5cda (diff) |
AST/stats: Don't effectively use an out-of-line function to return a static
bool. Ugh.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r-- | lib/AST/Stmt.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index 8b2e35376b..0deaaa83ba 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -78,11 +78,9 @@ void Stmt::addStmtClass(StmtClass s) { ++getStmtInfoTableEntry(s).Counter; } -static bool StatSwitch = false; - -bool Stmt::CollectingStats(bool Enable) { - if (Enable) StatSwitch = true; - return StatSwitch; +bool Stmt::StatisticsEnabled = false; +void Stmt::EnableStatistics() { + StatisticsEnabled = true; } Stmt *Stmt::IgnoreImplicit() { |