diff options
Diffstat (limited to 'lib/Support/Windows/Program.inc')
-rw-r--r-- | lib/Support/Windows/Program.inc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/Support/Windows/Program.inc b/lib/Support/Windows/Program.inc index dc09738e2e..5827c105af 100644 --- a/lib/Support/Windows/Program.inc +++ b/lib/Support/Windows/Program.inc @@ -11,8 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Windows.h" -#include "llvm/ADT/OwningPtr.h" +#include "WindowsSupport.h" #include "llvm/Support/FileSystem.h" #include <cstdio> #include <fcntl.h> @@ -187,7 +186,7 @@ static bool Execute(ProcessInfo &PI, StringRef Program, const char **args, } // Now build the command line. - OwningArrayPtr<char> command(new char[len+1]); + std::unique_ptr<char[]> command(new char[len+1]); char *p = command.get(); for (unsigned i = 0; args[i]; i++) { @@ -437,13 +436,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; |