diff options
Diffstat (limited to 'lib/AST')
-rw-r--r-- | lib/AST/DeclBase.cpp | 8 | ||||
-rw-r--r-- | lib/AST/Stmt.cpp | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index dbb0b6bfa4..10e612514f 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -39,8 +39,6 @@ using namespace clang; #define ABSTRACT_DECL(DECL) #include "clang/AST/DeclNodes.inc" -static bool StatSwitch = false; - void *Decl::AllocateDeserializedDecl(const ASTContext &Context, unsigned ID, unsigned Size) { @@ -88,9 +86,9 @@ const char *DeclContext::getDeclKindName() const { } } -bool Decl::CollectingStats(bool Enable) { - if (Enable) StatSwitch = true; - return StatSwitch; +bool Decl::StatisticsEnabled = false; +void Decl::EnableStatistics() { + StatisticsEnabled = true; } void Decl::PrintStats() { 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() { |