aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-16 22:00:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-16 22:00:17 +0000
commitde75d7ffcd5ed315240cfe0c52a821cf66411eda (patch)
tree3dfcc279db6a92120231c5c9ef7fec815bcb584d /include
parentaf3f5441b51c5f5317a585c816201e16b46891c6 (diff)
downloadexternal_llvm-de75d7ffcd5ed315240cfe0c52a821cf66411eda.zip
external_llvm-de75d7ffcd5ed315240cfe0c52a821cf66411eda.tar.gz
external_llvm-de75d7ffcd5ed315240cfe0c52a821cf66411eda.tar.bz2
Add slow path for single character write, and use exclusively for
single characters writes outside of the fast path in raw_ostream.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/raw_ostream.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
index 1eb92ed..8574659 100644
--- a/include/llvm/Support/raw_ostream.h
+++ b/include/llvm/Support/raw_ostream.h
@@ -82,7 +82,7 @@ public:
raw_ostream &operator<<(char C) {
if (OutBufCur >= OutBufEnd)
- flush_impl();
+ return write(C);
*OutBufCur++ = C;
if (Unbuffered)
flush_impl();
@@ -91,7 +91,7 @@ public:
raw_ostream &operator<<(unsigned char C) {
if (OutBufCur >= OutBufEnd)
- flush_impl();
+ return write(C);
*OutBufCur++ = C;
if (Unbuffered)
flush_impl();
@@ -100,7 +100,7 @@ public:
raw_ostream &operator<<(signed char C) {
if (OutBufCur >= OutBufEnd)
- flush_impl();
+ return write(C);
*OutBufCur++ = C;
if (Unbuffered)
flush_impl();
@@ -132,6 +132,7 @@ public:
return this->operator<<(ftostr(N));
}
+ raw_ostream &write(unsigned char C);
raw_ostream &write(const char *Ptr, unsigned Size);
// Formatted output, see the format() function in Support/Format.h.