summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Statistic.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 08:43:55 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 08:43:55 +0000
commit471ba48cb99a9d9bb8964f63363a3470369c2ecc (patch)
treec2df904af193eb7651904e850c607ea08dfbf3e4 /llvm/lib/Support/Statistic.cpp
parent0ad0c21248024f2343810fe3ab3b2d646ffb0ef4 (diff)
downloadbcm5719-llvm-471ba48cb99a9d9bb8964f63363a3470369c2ecc.tar.gz
bcm5719-llvm-471ba48cb99a9d9bb8964f63363a3470369c2ecc.zip
remove some uses of llvm/Support/Streams.h
llvm-svn: 79842
Diffstat (limited to 'llvm/lib/Support/Statistic.cpp')
-rw-r--r--llvm/lib/Support/Statistic.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Support/Statistic.cpp b/llvm/lib/Support/Statistic.cpp
index 06496fae91d..5ad569899ec 100644
--- a/llvm/lib/Support/Statistic.cpp
+++ b/llvm/lib/Support/Statistic.cpp
@@ -24,16 +24,15 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Mutex.h"
#include "llvm/ADT/StringExtras.h"
#include <algorithm>
-#include <ostream>
#include <cstring>
using namespace llvm;
// GetLibSupportInfoOutputFile - Return a file stream to print our output on.
-namespace llvm { extern std::ostream *GetLibSupportInfoOutputFile(); }
+namespace llvm { extern raw_ostream *GetLibSupportInfoOutputFile(); }
/// -stats - Command line option to cause transformations to emit stats about
/// what they did.
@@ -96,7 +95,7 @@ StatisticInfo::~StatisticInfo() {
if (Stats.empty()) return;
// Get the stream to write to.
- std::ostream &OutStream = *GetLibSupportInfoOutputFile();
+ raw_ostream &OutStream = *GetLibSupportInfoOutputFile();
// Figure out how long the biggest Value and Name fields are.
unsigned MaxNameLen = 0, MaxValLen = 0;
@@ -125,8 +124,9 @@ StatisticInfo::~StatisticInfo() {
}
- OutStream << std::endl; // Flush the output stream...
+ OutStream << '\n'; // Flush the output stream...
+ OutStream.flush();
- if (&OutStream != cerr.stream() && &OutStream != cout.stream())
+ if (&OutStream != &outs() && &OutStream != &errs())
delete &OutStream; // Close the file.
}
OpenPOWER on IntegriCloud