mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user