[llvm] r202001 - Delete dead code.

Rafael Espindola rafael.espindola at gmail.com
Sun Feb 23 17:07:39 PST 2014


Author: rafael
Date: Sun Feb 23 19:07:38 2014
New Revision: 202001

URL: http://llvm.org/viewvc/llvm-project?rev=202001&view=rev
Log:
Delete dead code.

Modified:
    llvm/trunk/include/llvm/Support/Program.h
    llvm/trunk/lib/Support/Unix/Program.inc
    llvm/trunk/lib/Support/Windows/Program.inc

Modified: llvm/trunk/include/llvm/Support/Program.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Program.h?rev=202001&r1=202000&r2=202001&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Program.h (original)
+++ llvm/trunk/include/llvm/Support/Program.h Sun Feb 23 19:07:38 2014
@@ -64,12 +64,11 @@ struct ProcessInfo {
   /// the program could not be found.
   std::string FindProgramByName(const std::string& name);
 
-  // These functions change the specified standard stream (stdin, stdout, or
-  // stderr) to binary mode. They return errc::success if the specified stream
+  // These functions change the specified standard stream (stdin or stdout) to
+  // binary mode. They return errc::success if the specified stream
   // was changed. Otherwise a platform dependent error is returned.
   error_code ChangeStdinToBinary();
   error_code ChangeStdoutToBinary();
-  error_code ChangeStderrToBinary();
 
   /// This function executes the program using the arguments provided.  The
   /// invoked program will inherit the stdin, stdout, and stderr file

Modified: llvm/trunk/lib/Support/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Program.inc?rev=202001&r1=202000&r2=202001&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Program.inc (original)
+++ llvm/trunk/lib/Support/Unix/Program.inc Sun Feb 23 19:07:38 2014
@@ -434,11 +434,6 @@ error_code sys::ChangeStdoutToBinary(){
   return make_error_code(errc::success);
 }
 
-error_code sys::ChangeStderrToBinary(){
-  // Do nothing, as Unix doesn't differentiate between text and binary.
-  return make_error_code(errc::success);
-}
-
 bool llvm::sys::argumentsFitWithinSystemLimits(ArrayRef<const char*> Args) {
   static long ArgMax = sysconf(_SC_ARG_MAX);
 

Modified: llvm/trunk/lib/Support/Windows/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Program.inc?rev=202001&r1=202000&r2=202001&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Program.inc (original)
+++ llvm/trunk/lib/Support/Windows/Program.inc Sun Feb 23 19:07:38 2014
@@ -437,13 +437,6 @@ error_code sys::ChangeStdoutToBinary(){
   return make_error_code(errc::success);
 }
 
-error_code sys::ChangeStderrToBinary(){
-  int result = _setmode( _fileno(stderr), _O_BINARY );
-  if (result == -1)
-    return error_code(errno, generic_category());
-  return make_error_code(errc::success);
-}
-
 bool llvm::sys::argumentsFitWithinSystemLimits(ArrayRef<const char*> Args) {
   // The documented max length of the command line passed to CreateProcess.
   static const size_t MaxCommandStringLength = 32768;





More information about the llvm-commits mailing list