[llvm] r183860 - Add global versions of some Program static methods.
Rafael Espindola
rafael.espindola at gmail.com
Wed Jun 12 13:42:59 PDT 2013
Author: rafael
Date: Wed Jun 12 15:42:59 2013
New Revision: 183860
URL: http://llvm.org/viewvc/llvm-project?rev=183860&view=rev
Log:
Add global versions of some Program static methods.
This is a temporary stepping stone for moving them out of Program.
Modified:
llvm/trunk/include/llvm/Support/Program.h
Modified: llvm/trunk/include/llvm/Support/Program.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Program.h?rev=183860&r1=183859&r2=183860&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Program.h (original)
+++ llvm/trunk/include/llvm/Support/Program.h Wed Jun 12 15:42:59 2013
@@ -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);
More information about the llvm-commits
mailing list