diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-16 22:28:34 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-16 22:28:34 +0000 |
commit | df7186636e51e63281bd318234b7d97f25efe491 (patch) | |
tree | 6d6680011bef8fcbeb2fd328fc1596a3999b0d22 /include | |
parent | 411b15e22ebc30c3988d4dbf45a818eedf606cb4 (diff) |
Simplify memory management with std::unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/Statistic.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h index d98abc375e8..7c84e3ef6b4 100644 --- a/include/llvm/ADT/Statistic.h +++ b/include/llvm/ADT/Statistic.h @@ -28,9 +28,11 @@ #include "llvm/Support/Atomic.h" #include "llvm/Support/Valgrind.h" +#include <memory> namespace llvm { class raw_ostream; +class raw_fd_ostream; class Statistic { public: @@ -170,6 +172,9 @@ void EnableStatistics(); /// \brief Check if statistics are enabled. bool AreStatisticsEnabled(); +/// \brief Return a file stream to print our output on. +std::unique_ptr<raw_fd_ostream> CreateInfoOutputFile(); + /// \brief Print statistics to the file returned by CreateInfoOutputFile(). void PrintStatistics(); |