From: Dan Gohman Date: Sat, 15 Aug 2009 02:01:04 +0000 (+0000) Subject: Move FormattedStream's write_impl out of line. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a4a68c1b439af1bacf8b9c3c06cdb97f56be4d94;p=oota-llvm.git Move FormattedStream's write_impl out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79064 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/FormattedStream.h b/include/llvm/Support/FormattedStream.h index a74ee6f7d9d..a7824f0aae2 100644 --- a/include/llvm/Support/FormattedStream.h +++ b/include/llvm/Support/FormattedStream.h @@ -60,11 +60,7 @@ namespace llvm /// iterator Scanned; - virtual void write_impl(const char *Ptr, size_t Size) { - ComputeColumn(); - TheStream->write(Ptr, Size); - Scanned = begin(); - } + virtual void write_impl(const char *Ptr, size_t Size); /// current_pos - Return the current position within the stream, /// not counting the bytes currently in the buffer. diff --git a/lib/Support/FormattedStream.cpp b/lib/Support/FormattedStream.cpp index 7f8adfc3d74..867e5de4d12 100644 --- a/lib/Support/FormattedStream.cpp +++ b/lib/Support/FormattedStream.cpp @@ -62,6 +62,12 @@ void formatted_raw_ostream::PadToColumn(unsigned NewCol, unsigned MinPad) { write(Spaces, num); } +void formatted_raw_ostream::write_impl(const char *Ptr, size_t Size) { + ComputeColumn(); + TheStream->write(Ptr, Size); + Scanned = begin(); +} + /// fouts() - This returns a reference to a formatted_raw_ostream for /// standard output. Use it like: fouts() << "foo" << "bar"; formatted_raw_ostream &llvm::fouts() {