Add some comments explaining what MVT and EVT are, and how they differ.
[oota-llvm.git] / include / llvm / System / Process.h
index f843af36fc4f60c0d66b0559f2857ffcf80b7758..41bcd69b6a44cd9345345a176757a4159fa0a0f3 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Reid Spencer and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -15,7 +15,6 @@
 #define LLVM_SYSTEM_PROCESS_H
 
 #include "llvm/System/TimeValue.h"
-#include "llvm/System/IncludeFile.h"
 
 namespace llvm {
 namespace sys {
@@ -31,7 +30,6 @@ namespace sys {
       /// This static function will return the operating system's virtual memory
       /// page size.
       /// @returns The number of bytes in a virtual memory page.
-      /// @throws nothing
       /// @brief Get the virtual memory page size
       static unsigned GetPageSize();
 
@@ -39,7 +37,6 @@ namespace sys {
       /// by the process. This only counts the memory allocated via the malloc,
       /// calloc and realloc functions and includes any "free" holes in the
       /// allocated space.
-      /// @throws nothing
       /// @brief Return process memory usage.
       static size_t GetMallocUsage();
 
@@ -95,11 +92,55 @@ namespace sys {
       /// the user rather than being put on a pipe or stored in a file.
       static bool StandardErrIsDisplayed();
 
+      /// This function determines if the given file descriptor 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 FileDescriptorIsDisplayed(int fd);
+
+      /// This function determines the number of columns in the window
+      /// if standard output is connected to a "tty" or "console"
+      /// window. If standard output is not connected to a tty or
+      /// console, or if the number of columns cannot be determined,
+      /// this routine returns zero.
+      static unsigned StandardOutColumns();
+
+      /// This function determines the number of columns in the window
+      /// if standard error is connected to a "tty" or "console"
+      /// window. If standard error is not connected to a tty or
+      /// console, or if the number of columns cannot be determined,
+      /// this routine returns zero.
+      static unsigned StandardErrColumns();
+
+      /// This function determines whether the terminal connected to standard
+      /// output supports colors. If standard output is not connected to a
+      /// terminal, this function returns false.
+      static bool StandardOutHasColors();
+
+      /// This function determines whether the terminal connected to standard
+      /// error supports colors. If standard error is not connected to a
+      /// terminal, this function returns false.
+      static bool StandardErrHasColors();
+
+      /// Whether changing colors requires the output to be flushed.
+      /// This is needed on systems that don't support escape sequences for
+      /// changing colors.
+      static bool ColorNeedsFlush();
+
+      /// This function returns the colorcode escape sequences.
+      /// If ColorNeedsFlush() is true then this function will change the colors
+      /// and return an empty escape sequence. In that case it is the
+      /// responsibility of the client to flush the output stream prior to
+      /// calling this function.
+      static const char *OutputColor(char c, bool bold, bool bg);
+
+      /// Same as OutputColor, but only enables the bold attribute.
+      static const char *OutputBold(bool bg);
+
+      /// Resets the terminals colors, or returns an escape sequence to do so.
+      static const char *ResetColor();
     /// @}
   };
 }
 }
 
-FORCE_DEFINING_FILE_TO_BE_LINKED(SystemProcess)
-
 #endif