summaryrefslogtreecommitdiff
path: root/tools/bugpoint
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-13 20:25:38 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-13 20:25:38 +0000
commit675e0ac0bfd6fb78423d9fbee9f50c1dec62c111 (patch)
treef5a9c3b5ad5e0bccc3366b4ea705d4cf9195473c /tools/bugpoint
parent11729224bf93d61ca6c31c02bfe4f1b171f8a4a7 (diff)
downloadllvm-675e0ac0bfd6fb78423d9fbee9f50c1dec62c111.tar.gz
llvm-675e0ac0bfd6fb78423d9fbee9f50c1dec62c111.tar.bz2
llvm-675e0ac0bfd6fb78423d9fbee9f50c1dec62c111.tar.xz
Avoid using PathV1.h in Program.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/OptimizerDriver.cpp10
-rw-r--r--tools/bugpoint/ToolRunner.cpp18
2 files changed, 10 insertions, 18 deletions
diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp
index 4c9219a71b..6d96330c9e 100644
--- a/tools/bugpoint/OptimizerDriver.cpp
+++ b/tools/bugpoint/OptimizerDriver.cpp
@@ -200,12 +200,12 @@ bool BugDriver::runPasses(Module *Program,
prog = tool;
// Redirect stdout and stderr to nowhere if SilencePasses is given
- sys::Path Nowhere;
- const sys::Path *Redirects[3] = {0, &Nowhere, &Nowhere};
+ StringRef Nowhere;
+ const StringRef *Redirects[3] = {0, &Nowhere, &Nowhere};
- int result =
- sys::ExecuteAndWait(prog, Args.data(), 0, (SilencePasses ? Redirects : 0),
- Timeout, MemoryLimit, &ErrMsg);
+ int result = sys::ExecuteAndWait(prog.str(), Args.data(), 0,
+ (SilencePasses ? Redirects : 0), Timeout,
+ MemoryLimit, &ErrMsg);
// If we are supposed to delete the bitcode file or if the passes crashed,
// remove it now. This may fail if the file was never created, but that's ok.
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index 30db4b59dc..0fea9788a6 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -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) {