16 #include "llvm/Config/llvm-config.h" 17 #include <system_error> 29 unsigned MemoryLimit, std::string *ErrMsg);
34 unsigned SecondsToWait,
unsigned MemoryLimit,
35 std::string *ErrMsg,
bool *ExecutionFailed) {
36 assert(Redirects.empty() || Redirects.size() == 3);
38 if (
Execute(PI, Program, Args, Env, Redirects, MemoryLimit, ErrMsg)) {
40 *ExecutionFailed =
false;
42 PI, SecondsToWait, SecondsToWait == 0, ErrMsg);
47 *ExecutionFailed =
true;
55 unsigned MemoryLimit, std::string *ErrMsg,
56 bool *ExecutionFailed) {
57 assert(Redirects.empty() || Redirects.size() == 3);
60 *ExecutionFailed =
false;
61 if (!
Execute(PI, Program, Args, Env, Redirects, MemoryLimit, ErrMsg))
63 *ExecutionFailed =
true;
72 for (
const char *
A : Args)
This class represents lattice values for constants.
ProcessInfo ExecuteNoWait(StringRef Program, ArrayRef< StringRef > Args, Optional< ArrayRef< StringRef >> Env, ArrayRef< Optional< StringRef >> Redirects={}, unsigned MemoryLimit=0, std::string *ErrMsg=nullptr, bool *ExecutionFailed=nullptr)
Similar to ExecuteAndWait, but returns immediately.
void reserve(size_type N)
int ExecuteAndWait(StringRef Program, ArrayRef< StringRef > Args, Optional< ArrayRef< StringRef >> Env=None, ArrayRef< Optional< StringRef >> Redirects={}, unsigned SecondsToWait=0, unsigned MemoryLimit=0, std::string *ErrMsg=nullptr, bool *ExecutionFailed=nullptr)
This function executes the program using the arguments provided.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
size_t size() const
size - Get the array size.
bool commandLineFitsWithinSystemLimits(StringRef Program, ArrayRef< StringRef > Args)
Return true if the given arguments fit within system-specific argument length limits.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
int ReturnCode
Platform-dependent process object.
void emplace_back(ArgTypes &&... Args)
This struct encapsulates information about a process.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static bool Execute(ProcessInfo &PI, StringRef Program, ArrayRef< StringRef > Args, Optional< ArrayRef< StringRef >> Env, ArrayRef< Optional< StringRef >> Redirects, unsigned MemoryLimit, std::string *ErrMsg)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
ProcessInfo Wait(const ProcessInfo &PI, unsigned SecondsToWait, bool WaitUntilTerminates, std::string *ErrMsg=nullptr)
This function waits for the process specified by PI to finish.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.