summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-07-20 18:29:41 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-07-20 18:29:41 +0000
commit04b4583c9baca0b5d501fd8bd10d7c08afd25a75 (patch)
tree9223688e12328cafa0413e9fbbb2d7f15bb8105d /llvm/lib/Support/raw_ostream.cpp
parent712de82154b6770a472ae78386273c6fd8ddf9b1 (diff)
downloadbcm5719-llvm-04b4583c9baca0b5d501fd8bd10d7c08afd25a75.tar.gz
bcm5719-llvm-04b4583c9baca0b5d501fd8bd10d7c08afd25a75.zip
raw_ostream: Add a has_colors() method.
llvm-svn: 160558
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 0cd9716ac94..fa69c2d3f53 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -651,6 +651,10 @@ bool raw_fd_ostream::is_displayed() const {
return sys::Process::FileDescriptorIsDisplayed(FD);
}
+bool raw_fd_ostream::has_colors() const {
+ return sys::Process::FileDescriptorHasColors(FD);
+}
+
//===----------------------------------------------------------------------===//
// outs(), errs(), nulls()
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud