aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/System
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-01-01 22:29:26 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-01-01 22:29:26 +0000
commita01aade75df50eb00c5d0be03594757f9abb3709 (patch)
treeac8fedb23f7c8f355b710c0015062d6122d456b3 /include/llvm/System
parent7109ce8258800f6136a556e0a076c22b432948d4 (diff)
downloadexternal_llvm-a01aade75df50eb00c5d0be03594757f9abb3709.zip
external_llvm-a01aade75df50eb00c5d0be03594757f9abb3709.tar.gz
external_llvm-a01aade75df50eb00c5d0be03594757f9abb3709.tar.bz2
Add functions for determining if the stdin/out/err is connected to a
console or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r--include/llvm/System/Process.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/System/Process.h b/include/llvm/System/Process.h
index 7733cf5..5070bbe 100644
--- a/include/llvm/System/Process.h
+++ b/include/llvm/System/Process.h
@@ -69,6 +69,21 @@ namespace sys {
/// @brief Prevent core file generation.
static void PreventCoreFiles();
+ /// This function determines if the standard input is connected directly
+ /// to a user's input (keyboard probably), rather than coming from a file
+ /// or pipe.
+ static bool StandardInIsUserInput();
+
+ /// This function determines if the standard output 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.
+ static bool StandardOutIsDisplayed();
+
+ /// This function determines if the standard error 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.
+ static bool StandardErrIsDisplayed();
+
/// @}
};
}