aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Windows
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-07-20 18:29:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-07-20 18:29:38 +0000
commit7d83658140cb99871a43a08715a45c84aa66f3cc (patch)
tree1dc801549e135220329cef898daf42221fde5bdf /lib/Support/Windows
parentb1a464279623768a3d04ff6726c99dce35d2f360 (diff)
Process: Add sys::Process::FileDescriptorHasColors().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows')
-rw-r--r--lib/Support/Windows/Process.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Support/Windows/Process.inc b/lib/Support/Windows/Process.inc
index 6a1270c2f3..43ba028a89 100644
--- a/lib/Support/Windows/Process.inc
+++ b/lib/Support/Windows/Process.inc
@@ -153,13 +153,17 @@ unsigned Process::StandardErrColumns() {
return Columns;
}
-// It always has colors.
-bool Process::StandardErrHasColors() {
- return StandardErrIsDisplayed();
+// The terminal always has colors.
+bool FileDescriptorHasColors(int fd) {
+ return FileDescriptorIsDisplayed(fd);
}
bool Process::StandardOutHasColors() {
- return StandardOutIsDisplayed();
+ return FileDescriptorHasColors(1);
+}
+
+bool Process::StandardErrHasColors() {
+ return FileDescriptorHasColors(2);
}
namespace {