[llvm-commits] CVS: llvm/lib/Support/SystemUtils.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Apr 1 23:05:02 PST 2004


Changes in directory llvm/lib/Support:

SystemUtils.cpp updated: 1.21 -> 1.22

---
Log message:

Add new function, autoconf support required tho


---
Diffs of the changes:  (+8 -0)

Index: llvm/lib/Support/SystemUtils.cpp
diff -u llvm/lib/Support/SystemUtils.cpp:1.21 llvm/lib/Support/SystemUtils.cpp:1.22
--- llvm/lib/Support/SystemUtils.cpp:1.21	Sat Jan 10 13:15:14 2004
+++ llvm/lib/Support/SystemUtils.cpp	Thu Apr  1 23:04:03 2004
@@ -44,6 +44,14 @@
     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





More information about the llvm-commits mailing list