summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-02 05:04:03 +0000
committerChris Lattner <sabre@nondot.org>2004-04-02 05:04:03 +0000
commit454e18317defdfa3e204ef2fde91ef639079400f (patch)
treeb64901fce167219043216e674c928f859feb54d9 /llvm/lib/Support/SystemUtils.cpp
parentfd8f46b1cd9828b59ecde97fda274ebcf0b6e06c (diff)
downloadbcm5719-llvm-454e18317defdfa3e204ef2fde91ef639079400f.tar.gz
bcm5719-llvm-454e18317defdfa3e204ef2fde91ef639079400f.zip
Add new function, autoconf support required tho
llvm-svn: 12600
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r--llvm/lib/Support/SystemUtils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp
index 4ca3e990de4..07811d891c5 100644
--- a/llvm/lib/Support/SystemUtils.cpp
+++ b/llvm/lib/Support/SystemUtils.cpp
@@ -44,6 +44,14 @@ bool llvm::isExecutableFile(const std::string &ExeFileName) {
return Buf.st_mode & S_IXOTH;
}
+/// isStandardOutAConsole - Return true if we can tell that the standard output
+/// stream goes to a terminal window or console.
+bool llvm::isStandardOutAConsole() {
+ // FIXME: if we don't have isatty, just return false.
+ return isatty(1);
+}
+
+
/// FindExecutable - Find a named executable, giving the argv[0] of program
/// being executed. This allows us to find another LLVM tool if it is built
/// into the same directory, but that directory is neither the current
OpenPOWER on IntegriCloud