return *this;
}
+ /// write_hex - Output \arg N in hexadecimal, without any prefix or padding.
+ raw_ostream &write_hex(unsigned long long N);
+
raw_ostream &write(unsigned char C);
raw_ostream &write(const char *Ptr, size_t Size);
return this->operator<<(static_cast<unsigned long long>(N));
}
-raw_ostream &raw_ostream::operator<<(const void *P) {
- uintptr_t N = (uintptr_t) P;
- *this << '0' << 'x';
-
+raw_ostream &raw_ostream::write_hex(unsigned long long N) {
// Zero is a special case.
if (N == 0)
return *this << '0';
return write(CurPtr, EndPtr-CurPtr);
}
+raw_ostream &raw_ostream::operator<<(const void *P) {
+ *this << '0' << 'x';
+
+ return write_hex((uintptr_t) P);
+}
+
void raw_ostream::flush_nonempty() {
assert(OutBufCur > OutBufStart && "Invalid call to flush_nonempty.");
write_impl(OutBufStart, OutBufCur - OutBufStart);