diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-30 17:32:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-30 17:32:08 +0000 |
commit | 6ce57922bb8d550d91c8133d1fd27dd3eaf24c22 (patch) | |
tree | cdfbcb2c7c81aac9ec47b8fc67dc0fe7bf2bc8a8 /include/llvm/ADT | |
parent | 8260ea5c6c15345e00ced1398b03e6886145e45c (diff) | |
download | external_llvm-6ce57922bb8d550d91c8133d1fd27dd3eaf24c22.zip external_llvm-6ce57922bb8d550d91c8133d1fd27dd3eaf24c22.tar.gz external_llvm-6ce57922bb8d550d91c8133d1fd27dd3eaf24c22.tar.bz2 |
Introduce namespace-scope functions to enable LLVM statistics without
passing the command-line parameter "-stats" and to print the resulting
statistics without calling llvm_shutdown().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/Statistic.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h index 1a4833c..c593c58 100644 --- a/include/llvm/ADT/Statistic.h +++ b/include/llvm/ADT/Statistic.h @@ -29,6 +29,7 @@ #include "llvm/System/Atomic.h" namespace llvm { +class raw_ostream; class Statistic { public: @@ -113,6 +114,15 @@ protected: #define STATISTIC(VARNAME, DESC) \ static llvm::Statistic VARNAME = { DEBUG_TYPE, DESC, 0, 0 } +/// \brief Enable the collection and printing of statistics. +void EnableStatistics(); + +/// \brief Print statistics to the file returned by CreateInfoOutputFile(). +void PrintStatistics(); + +/// \brief Print statistics to the given output stream. +void PrintStatistics(raw_ostream &OS); + } // End llvm namespace #endif |