summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-13 16:22:26 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-13 16:22:26 +0000
commit13f17ea6c091423819b4008067f9835c7688edb4 (patch)
tree6c49e003e5f454d3dbb199415ff905fbdf791cc0 /tools
parentf37802859f7b87bc85899d19ff0868ddabc225e0 (diff)
downloadllvm-13f17ea6c091423819b4008067f9835c7688edb4.tar.gz
llvm-13f17ea6c091423819b4008067f9835c7688edb4.tar.bz2
llvm-13f17ea6c091423819b4008067f9835c7688edb4.tar.xz
Further reduce usage of sys::Path in bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/bugpoint/ToolRunner.cpp16
-rw-r--r--tools/bugpoint/ToolRunner.h6
2 files changed, 11 insertions, 11 deletions
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index 92250418d1..00f14f4fd0 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -714,8 +714,8 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
errs() << " " << GCCArgs[i];
errs() << "\n";
);
- if (RunProgramWithTimeout(GCCPath.str(), &GCCArgs[0], "", "", "")) {
- *Error = ProcessFailure(GCCPath.str(), &GCCArgs[0]);
+ if (RunProgramWithTimeout(GCCPath, &GCCArgs[0], "", "", "")) {
+ *Error = ProcessFailure(GCCPath, &GCCArgs[0]);
return -1;
}
@@ -725,7 +725,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
// ProgramArgs is used.
std::string Exec;
- if (RemoteClientPath.isEmpty())
+ if (RemoteClientPath.empty())
ProgramArgs.push_back(OutputBinary.c_str());
else {
ProgramArgs.push_back(RemoteClientPath.c_str());
@@ -767,7 +767,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
FileRemover OutputBinaryRemover(OutputBinary.str(), !SaveTemps);
- if (RemoteClientPath.isEmpty()) {
+ if (RemoteClientPath.empty()) {
DEBUG(errs() << "<run locally>");
int ExitCode = RunProgramWithTimeout(OutputBinary.str(), &ProgramArgs[0],
InputFile, OutputFile, OutputFile,
@@ -783,7 +783,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
return ExitCode;
} else {
outs() << "<run remotely>"; outs().flush();
- return RunProgramRemotelyWithTimeout(RemoteClientPath.str(),
+ return RunProgramRemotelyWithTimeout(RemoteClientPath,
&ProgramArgs[0], InputFile, OutputFile,
OutputFile, Timeout, MemoryLimit);
}
@@ -863,8 +863,8 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
errs() << " " << GCCArgs[i];
errs() << "\n";
);
- if (RunProgramWithTimeout(GCCPath.str(), &GCCArgs[0], "", "", "")) {
- Error = ProcessFailure(GCCPath.str(), &GCCArgs[0]);
+ if (RunProgramWithTimeout(GCCPath, &GCCArgs[0], "", "", "")) {
+ Error = ProcessFailure(GCCPath, &GCCArgs[0]);
return 1;
}
return 0;
@@ -886,5 +886,5 @@ GCC *GCC::create(std::string &Message,
RemoteClientPath = sys::FindProgramByName(RemoteClient);
Message = "Found gcc: " + GCCPath.str() + "\n";
- return new GCC(GCCPath, RemoteClientPath, Args);
+ return new GCC(GCCPath.str(), RemoteClientPath.str(), Args);
}
diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h
index 28c09f5004..8589727753 100644
--- a/tools/bugpoint/ToolRunner.h
+++ b/tools/bugpoint/ToolRunner.h
@@ -38,10 +38,10 @@ class LLC;
// GCC abstraction
//
class GCC {
- sys::Path GCCPath; // The path to the gcc executable.
- sys::Path RemoteClientPath; // The path to the rsh / ssh executable.
+ std::string GCCPath; // The path to the gcc executable.
+ std::string RemoteClientPath; // The path to the rsh / ssh executable.
std::vector<std::string> gccArgs; // GCC-specific arguments.
- GCC(const sys::Path &gccPath, const sys::Path &RemotePath,
+ GCC(StringRef gccPath, StringRef RemotePath,
const std::vector<std::string> *GCCArgs)
: GCCPath(gccPath), RemoteClientPath(RemotePath) {
if (GCCArgs) gccArgs = *GCCArgs;