Avoid using PathV1.h in Program.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2013-06-13 20:25:38 +00:00
parent 11729224bf
commit 675e0ac0bf
9 changed files with 58 additions and 65 deletions
+5 -13
View File
@@ -61,11 +61,7 @@ static int RunProgramWithTimeout(StringRef ProgramPath,
unsigned NumSeconds = 0,
unsigned MemoryLimit = 0,
std::string *ErrMsg = 0) {
const sys::Path P[3] = { sys::Path(StdInFile), sys::Path(StdOutFile),
sys::Path(StdErrFile) };
const sys::Path* redirects[3];
for (int I = 0; I < 3; ++I)
redirects[I] = &P[I];
const StringRef *Redirects[3] = { &StdInFile, &StdOutFile, &StdErrFile };
#if 0 // For debug purposes
{
@@ -76,7 +72,7 @@ static int RunProgramWithTimeout(StringRef ProgramPath,
}
#endif
return sys::ExecuteAndWait(sys::Path(ProgramPath), Args, 0, redirects,
return sys::ExecuteAndWait(ProgramPath, Args, 0, Redirects,
NumSeconds, MemoryLimit, ErrMsg);
}
@@ -93,11 +89,7 @@ static int RunProgramRemotelyWithTimeout(StringRef RemoteClientPath,
StringRef StdErrFile,
unsigned NumSeconds = 0,
unsigned MemoryLimit = 0) {
const sys::Path P[3] = { sys::Path(StdInFile), sys::Path(StdOutFile),
sys::Path(StdErrFile) };
const sys::Path* redirects[3];
for (int I = 0; I < 3; ++I)
redirects[I] = &P[I];
const StringRef *Redirects[3] = { &StdInFile, &StdOutFile, &StdErrFile };
#if 0 // For debug purposes
{
@@ -109,8 +101,8 @@ static int RunProgramRemotelyWithTimeout(StringRef RemoteClientPath,
#endif
// Run the program remotely with the remote client
int ReturnCode = sys::ExecuteAndWait(sys::Path(RemoteClientPath), Args, 0,
redirects, NumSeconds, MemoryLimit);
int ReturnCode = sys::ExecuteAndWait(RemoteClientPath, Args, 0,
Redirects, NumSeconds, MemoryLimit);
// Has the remote client fail?
if (255 == ReturnCode) {