summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Program.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-12-13 23:16:49 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-12-13 23:16:49 +0000
commitb92cb30cf547bf9a8590a981a49040f480c8eb82 (patch)
treefc2accf7bb61ca5179758404fefeb418e1a2aed0 /include/llvm/Support/Program.h
parentfaebf11a3468767bb702b8e9fca98237f1d3a126 (diff)
downloadllvm-b92cb30cf547bf9a8590a981a49040f480c8eb82.tar.gz
llvm-b92cb30cf547bf9a8590a981a49040f480c8eb82.tar.bz2
llvm-b92cb30cf547bf9a8590a981a49040f480c8eb82.tar.xz
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/llvm/Support/Program.h')
-rw-r--r--include/llvm/Support/Program.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/Support/Program.h b/include/llvm/Support/Program.h
index a5026573aa..a85f23550e 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(..);