summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-24 03:52:50 +0000
committerChris Lattner <sabre@nondot.org>2009-08-24 03:52:50 +0000
commit06fa1768620138a57dcad5277b0a3dd0adb505cc (patch)
tree8d3812f834a6c7e3d96c27ceee2c48ef87f6344f /llvm/lib/Support/raw_ostream.cpp
parente849956de8498673d17d64902386f48ec8efcad9 (diff)
downloadbcm5719-llvm-06fa1768620138a57dcad5277b0a3dd0adb505cc.tar.gz
bcm5719-llvm-06fa1768620138a57dcad5277b0a3dd0adb505cc.zip
prune the #includes in raw_ostream.h by moving a
member out of line. ftostr is not particularly speedy, so that method is presumably not perf sensitive. llvm-svn: 79885
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 221859d5337..4dd891d64f8 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -19,6 +19,7 @@
#include "llvm/Config/config.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/ADT/StringExtras.h"
#include <ostream>
#include <sys/stat.h>
#include <sys/types.h>
@@ -173,6 +174,13 @@ raw_ostream &raw_ostream::operator<<(const void *P) {
return write_hex((uintptr_t) P);
}
+raw_ostream &raw_ostream::operator<<(double N) {
+ this->operator<<(ftostr(N));
+ return *this;
+}
+
+
+
void raw_ostream::flush_nonempty() {
assert(OutBufCur > OutBufStart && "Invalid call to flush_nonempty.");
size_t Length = OutBufCur - OutBufStart;
OpenPOWER on IntegriCloud