diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-12 20:42:59 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-12 20:42:59 +0000 |
| commit | 35ac91c9329541682ca461a2d3ccc263d9fb559d (patch) | |
| tree | b32877b99ab75615694baa477e5931683a464502 | |
| parent | 736a947bdca65e9bcc1550772fd2120a1bcd47a8 (diff) | |
| download | bcm5719-llvm-35ac91c9329541682ca461a2d3ccc263d9fb559d.tar.gz bcm5719-llvm-35ac91c9329541682ca461a2d3ccc263d9fb559d.zip | |
Add global versions of some Program static methods.
This is a temporary stepping stone for moving them out of Program.
llvm-svn: 183860
| -rw-r--r-- | llvm/include/llvm/Support/Program.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Program.h b/llvm/include/llvm/Support/Program.h index 08a64dedfac..db12a153f63 100644 --- a/llvm/include/llvm/Support/Program.h +++ b/llvm/include/llvm/Support/Program.h @@ -17,6 +17,7 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Path.h" #include "llvm/Support/PathV1.h" +#include "llvm/Support/system_error.h" namespace llvm { class error_code; @@ -143,6 +144,24 @@ namespace sys { }; + inline int ExecuteAndWait(const Path &path, const char **args, + const char **env = 0, + const sys::Path **redirects = 0, + unsigned secondsToWait = 0, + unsigned memoryLimit = 0, std::string *ErrMsg = 0, + bool *ExecutionFailed = 0) { + return Program::ExecuteAndWait(path, args, env, redirects, secondsToWait, + memoryLimit, ErrMsg, ExecutionFailed); + } + + inline Path FindProgramByName(const std::string& name) { + return Program::FindProgramByName(name); + } + + inline error_code ChangeStdoutToBinary() { + return Program::ChangeStdoutToBinary(); + } + // Return true if the given arguments fit within system-specific // argument length limits. bool argumentsFitWithinSystemLimits(ArrayRef<const char*> Args); |

