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;
}
// 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());
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,
return ExitCode;
} else {
outs() << "<run remotely>"; outs().flush();
- return RunProgramRemotelyWithTimeout(RemoteClientPath.str(),
+ return RunProgramRemotelyWithTimeout(RemoteClientPath,
&ProgramArgs[0], InputFile, OutputFile,
OutputFile, Timeout, MemoryLimit);
}
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;
RemoteClientPath = sys::FindProgramByName(RemoteClient);
Message = "Found gcc: " + GCCPath.str() + "\n";
- return new GCC(GCCPath, RemoteClientPath, Args);
+ return new GCC(GCCPath.str(), RemoteClientPath.str(), Args);
}
// 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;