aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Support/raw_ostream.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index 5a99a0cf40..43f46837d3 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -63,10 +63,7 @@ raw_ostream &raw_ostream::operator<<(unsigned long N) {
raw_ostream &raw_ostream::operator<<(long N) {
if (N < 0) {
- if (OutBufCur >= OutBufEnd)
- flush_impl();
- *OutBufCur++ = '-';
-
+ *this << '-';
N = -N;
}
@@ -91,10 +88,7 @@ raw_ostream &raw_ostream::operator<<(unsigned long long N) {
raw_ostream &raw_ostream::operator<<(long long N) {
if (N < 0) {
- if (OutBufCur >= OutBufEnd)
- flush_impl();
- *OutBufCur++ = '-';
-
+ *this << '-';
N = -N;
}
@@ -106,6 +100,12 @@ raw_ostream &raw_ostream::operator<<(const void *P) {
return *this << format("%p", P);
}
+raw_ostream &raw_ostream::write(unsigned char C) {
+ if (OutBufCur >= OutBufEnd)
+ flush_impl();
+
+ *OutBufCur++ = C;
+}
raw_ostream &raw_ostream::write(const char *Ptr, unsigned Size) {
if (OutBufCur+Size > OutBufEnd)