[llvm] r183912 - Further reduce usage of sys::Path in bugpoint.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jun 13 09:22:27 PDT 2013
Author: rafael
Date: Thu Jun 13 11:22:26 2013
New Revision: 183912
URL: http://llvm.org/viewvc/llvm-project?rev=183912&view=rev
Log:
Further reduce usage of sys::Path in bugpoint.
Modified:
llvm/trunk/tools/bugpoint/ToolRunner.cpp
llvm/trunk/tools/bugpoint/ToolRunner.h
Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=183912&r1=183911&r2=183912&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original)
+++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Thu Jun 13 11:22:26 2013
@@ -714,8 +714,8 @@ int GCC::ExecuteProgram(const std::strin
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::strin
// 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::strin
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::strin
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::str
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);
}
Modified: llvm/trunk/tools/bugpoint/ToolRunner.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.h?rev=183912&r1=183911&r2=183912&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ToolRunner.h (original)
+++ llvm/trunk/tools/bugpoint/ToolRunner.h Thu Jun 13 11:22:26 2013
@@ -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;
More information about the llvm-commits
mailing list