diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-30 05:01:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-30 05:01:08 +0000 |
commit | 6cbd8d118e43e152835421af2f7edf05653c6451 (patch) | |
tree | 59cf2e53288fc8cab6edf93afe65be1123d3d28a /llvm/lib/Support/Statistic.cpp | |
parent | dcd68b7a658dc95d3e14104ae16c2b36424b78b6 (diff) | |
download | bcm5719-llvm-6cbd8d118e43e152835421af2f7edf05653c6451.tar.gz bcm5719-llvm-6cbd8d118e43e152835421af2f7edf05653c6451.zip |
rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
have it always return a new stream to simplify clients.
llvm-svn: 99874
Diffstat (limited to 'llvm/lib/Support/Statistic.cpp')
-rw-r--r-- | llvm/lib/Support/Statistic.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Support/Statistic.cpp b/llvm/lib/Support/Statistic.cpp index f88094af74b..40589c5a1c7 100644 --- a/llvm/lib/Support/Statistic.cpp +++ b/llvm/lib/Support/Statistic.cpp @@ -32,8 +32,8 @@ #include <cstring> using namespace llvm; -// GetLibSupportInfoOutputFile - Return a file stream to print our output on. -namespace llvm { extern raw_ostream *GetLibSupportInfoOutputFile(); } +// CreateInfoOutputFile - Return a file stream to print our output on. +namespace llvm { extern raw_ostream *CreateInfoOutputFile(); } /// -stats - Command line option to cause transformations to emit stats about /// what they did. @@ -96,7 +96,7 @@ StatisticInfo::~StatisticInfo() { if (Stats.empty()) return; // Get the stream to write to. - raw_ostream &OutStream = *GetLibSupportInfoOutputFile(); + raw_ostream &OutStream = *CreateInfoOutputFile(); // Figure out how long the biggest Value and Name fields are. unsigned MaxNameLen = 0, MaxValLen = 0; @@ -125,9 +125,8 @@ StatisticInfo::~StatisticInfo() { } - OutStream << '\n'; // Flush the output stream... + OutStream << '\n'; // Flush the output stream. OutStream.flush(); - if (&OutStream != &outs() && &OutStream != &errs()) - delete &OutStream; // Close the file. + delete &OutStream; // Close the file. } |