Delete dead code.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 24 Feb 2014 01:07:38 +0000 (01:07 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 24 Feb 2014 01:07:38 +0000 (01:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202001 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Program.h
lib/Support/Unix/Program.inc
lib/Support/Windows/Program.inc

index 60b2181830630829201fb806157d6a5ba8e6ee3c..a1067a649ceccdbbba0974f32b5f34ac4970e488 100644 (file)
@@ -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
index 5aa024a335201df79b8cb1dc8a43dc4581a405c1..b4df928489737ce8fe8a4e832578e6e345953407 100644 (file)
@@ -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);
 
index 365e87eea592d01c56a2d11ac737059ae3ccfa8a..1b777084c710e9c9c1da6eda8131b9c987a7a810 100644 (file)
@@ -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;