diff options
Diffstat (limited to 'llvm/include/llvm/Support/Program.h')
-rw-r--r-- | llvm/include/llvm/Support/Program.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Program.h b/llvm/include/llvm/Support/Program.h index bfd271958788..f91fca1c4464 100644 --- a/llvm/include/llvm/Support/Program.h +++ b/llvm/include/llvm/Support/Program.h @@ -19,6 +19,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Config/llvm-config.h" #include "llvm/Support/ErrorOr.h" +#include "llvm/Support/FileSystem.h" #include <chrono> #include <system_error> @@ -77,6 +78,12 @@ namespace sys { ErrorOr<std::string> findProgramByName(StringRef Name, ArrayRef<StringRef> Paths = {}); + // These functions change the specified standard stream (stdin or stdout) mode + // based on the Flags. They return errc::success if the specified stream was + // changed. Otherwise, a platform dependent error is returned. + std::error_code ChangeStdinMode(fs::OpenFlags Flags); + std::error_code ChangeStdoutMode(fs::OpenFlags Flags); + // 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. |