summaryrefslogtreecommitdiff
path: root/include/llvm/Support/raw_ostream.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-04-16 07:07:38 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-04-16 07:07:38 +0000
commit7d31d75a77bb7a5a47f21d4c311ba13be86caa6f (patch)
tree54284d4bcc79bee085dba49e1ad5ba429a250013 /include/llvm/Support/raw_ostream.h
parent92040745984933f51b7c36b8b93f0e5a1931feee (diff)
downloadllvm-7d31d75a77bb7a5a47f21d4c311ba13be86caa6f.tar.gz
llvm-7d31d75a77bb7a5a47f21d4c311ba13be86caa6f.tar.bz2
llvm-7d31d75a77bb7a5a47f21d4c311ba13be86caa6f.tar.xz
Add reverseColor to raw_ostream.
To be used in printing unprintable source in clang diagnostics. Patch by Seth Cantrell! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154800 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/raw_ostream.h')
-rw-r--r--include/llvm/Support/raw_ostream.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
index 6bfae5e298..6c5d4787e0 100644
--- a/include/llvm/Support/raw_ostream.h
+++ b/include/llvm/Support/raw_ostream.h
@@ -222,6 +222,9 @@ public:
/// outputting colored text, or before program exit.
virtual raw_ostream &resetColor() { return *this; }
+ /// Reverses the forground and background colors.
+ virtual raw_ostream &reverseColor() { return *this; }
+
/// This function determines if this stream is connected to a "tty" or
/// "console" window. That is, the output would be displayed to the user
/// rather than being put on a pipe or stored in a file.
@@ -379,6 +382,8 @@ public:
bool bg=false);
virtual raw_ostream &resetColor();
+ virtual raw_ostream &reverseColor();
+
virtual bool is_displayed() const;
/// has_error - Return the value of the flag in this raw_fd_ostream indicating