diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-24 03:52:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-24 03:52:50 +0000 |
commit | 23132b188ba651ba172380cd082cc286df73d440 (patch) | |
tree | 4774267b96b9e5f813a16df7f0dc062d160671f3 /lib/Support | |
parent | e8f6e795ffaf876defcad01af6826cc8686d72d3 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/raw_ostream.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 221859d533..4dd891d64f 100644 --- a/lib/Support/raw_ostream.cpp +++ b/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; |