diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index af3e67b3d33..6d538003fed 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -66,10 +66,10 @@ public: } raw_ostream &operator<<(const char *Str) { - return OutputData(Str, strlen(Str)); + return write(Str, strlen(Str)); } - raw_ostream &OutputData(const char *Ptr, unsigned Size) { + raw_ostream &write(const char *Ptr, unsigned Size) { if (OutBufCur+Size > OutBufEnd) flush_impl(); diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index ec7ac6d0074..e47bccde6cb 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -51,7 +51,7 @@ raw_fd_ostream::~raw_fd_ostream() { void raw_fd_ostream::flush_impl() { if (OutBufCur-OutBufStart) - write(FD, OutBufStart, OutBufCur-OutBufStart); + ::write(FD, OutBufStart, OutBufCur-OutBufStart); HandleFlush(); }