[llvm-commits] [llvm] r126558 - in /llvm/trunk: include/llvm/ADT/Statistic.h lib/Support/Statistic.cpp

Daniel Dunbar daniel at zuster.org
Sat Feb 26 15:17:12 PST 2011


Author: ddunbar
Date: Sat Feb 26 17:17:12 2011
New Revision: 126558

URL: http://llvm.org/viewvc/llvm-project?rev=126558&view=rev
Log:
Support: Add llvm::AreStatisticsEnabled().

Modified:
    llvm/trunk/include/llvm/ADT/Statistic.h
    llvm/trunk/lib/Support/Statistic.cpp

Modified: llvm/trunk/include/llvm/ADT/Statistic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Statistic.h?rev=126558&r1=126557&r2=126558&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Statistic.h (original)
+++ llvm/trunk/include/llvm/ADT/Statistic.h Sat Feb 26 17:17:12 2011
@@ -121,6 +121,9 @@
 /// \brief Enable the collection and printing of statistics.
 void EnableStatistics();
 
+/// \brief Check if statistics are enabled.
+bool AreStatisticsEnabled();
+
 /// \brief Print statistics to the file returned by CreateInfoOutputFile().
 void PrintStatistics();
 

Modified: llvm/trunk/lib/Support/Statistic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Statistic.cpp?rev=126558&r1=126557&r2=126558&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Statistic.cpp (original)
+++ llvm/trunk/lib/Support/Statistic.cpp Sat Feb 26 17:17:12 2011
@@ -101,6 +101,10 @@
   Enabled.setValue(true);
 }
 
+bool llvm::AreStatisticsEnabled() {
+  return Enabled;
+}
+
 void llvm::PrintStatistics(raw_ostream &OS) {
   StatisticInfo &Stats = *StatInfo;
 





More information about the llvm-commits mailing list