diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-12-13 23:16:49 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-12-13 23:16:49 +0000 |
commit | b92cb30cf547bf9a8590a981a49040f480c8eb82 (patch) | |
tree | fc2accf7bb61ca5179758404fefeb418e1a2aed0 /include | |
parent | faebf11a3468767bb702b8e9fca98237f1d3a126 (diff) | |
download | external_llvm-b92cb30cf547bf9a8590a981a49040f480c8eb82.zip external_llvm-b92cb30cf547bf9a8590a981a49040f480c8eb82.tar.gz external_llvm-b92cb30cf547bf9a8590a981a49040f480c8eb82.tar.bz2 |
Support/Program: Make Change<stream>ToBinary return error_code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/Program.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/Support/Program.h b/include/llvm/Support/Program.h index a502657..a85f235 100644 --- a/include/llvm/Support/Program.h +++ b/include/llvm/Support/Program.h @@ -17,6 +17,7 @@ #include "llvm/Support/Path.h" namespace llvm { +class error_code; namespace sys { // TODO: Add operations to communicate with the process, redirect its I/O, @@ -122,12 +123,12 @@ namespace sys { /// @brief Construct a Program by finding it by name. static Path FindProgramByName(const std::string& name); - // These methods change the specified standard stream (stdin, - // stdout, or stderr) to binary mode. They return true if an error - // occurred - static bool ChangeStdinToBinary(); - static bool ChangeStdoutToBinary(); - static bool ChangeStderrToBinary(); + // These methods change the specified standard stream (stdin, stdout, or + // stderr) to binary mode. They return errc::success if the specified stream + // was changed. Otherwise a platform dependent error is returned. + static error_code ChangeStdinToBinary(); + static error_code ChangeStdoutToBinary(); + static error_code ChangeStderrToBinary(); /// A convenience function equivalent to Program prg; prg.Execute(..); /// prg.Wait(..); |