AST/stats: Don't effectively use an out-of-line function to return a static
bool. Ugh.

llvm-svn: 152062
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index dbb0b6b..10e6125 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -39,8 +39,6 @@
 #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 @@
   }
 }
 
-bool Decl::CollectingStats(bool Enable) {
-  if (Enable) StatSwitch = true;
-  return StatSwitch;
+bool Decl::StatisticsEnabled = false;
+void Decl::EnableStatistics() {
+  StatisticsEnabled = true;
 }
 
 void Decl::PrintStats() {