diff options
author | David Greene <greened@obbligato.org> | 2009-07-09 23:43:41 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-07-09 23:43:41 +0000 |
commit | 53674361efd42f9dd7c4d293132106839ab3b893 (patch) | |
tree | 20db7728f1795eb85c05c0eba2a49e36b93b0d46 /include | |
parent | e5564748b7d35df5c06fd243d04ea1eb305d3bc3 (diff) | |
download | external_llvm-53674361efd42f9dd7c4d293132106839ab3b893.zip external_llvm-53674361efd42f9dd7c4d293132106839ab3b893.tar.gz external_llvm-53674361efd42f9dd7c4d293132106839ab3b893.tar.bz2 |
Add some hooks that a redesigned AsmStream needs to do its job. These
allow derived classes to examine the stream buffer before it's flushed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/raw_ostream.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 8242f04..22fb384 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -44,6 +44,22 @@ private: char *OutBufStart, *OutBufEnd, *OutBufCur; bool Unbuffered; +protected: + /// CurBufPtr - Get a pointer to the current location in the buffer. + /// + char *CurBufPtr(void) { return OutBufCur; } + /// StartBufPtr - Get a pointer to the start of the buffer + /// + char *StartBufPtr(void) { return OutBufStart; } + /// EndBufPtr - Get a pointer to the end of the buffer + /// + char *EndBufPtr(void) { return OutBufEnd; } + + /// AboutToFlush- Called when the buffer is about to be flushed, + /// allowing derived classes to take some action. + /// + virtual void AboutToFlush(void) {}; + public: // color order matches ANSI escape sequence, don't change enum Colors { |