void setTitle(std::string Value) { DriverTitle = Value; }
/// \brief Get the path to the main clang executable.
- std::string getClangProgramPath() const {
- return ClangExecutable;
+ const char *getClangProgramPath() const {
+ return ClangExecutable.c_str();
}
/// @}
Args.AddAllArgs(CmdArgs, options::OPT_undef);
- std::string Exec = getToolChain().getDriver().getClangProgramPath();
+ const char *Exec = getToolChain().getDriver().getClangProgramPath();
// Optionally embed the -cc1 level arguments into the debug info, for build
// analysis.
CmdArgs.push_back(Args.MakeArgString(Flags.str()));
}
- Dest.addCommand(new Command(JA, *this, Exec.c_str(), CmdArgs));
+ Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
// Explicitly warn that these options are unsupported, even though
// we are allowing compilation to continue.
CmdArgs.push_back(Input.getFilename());
}
- std::string Exec = getToolChain().getDriver().getClangProgramPath();
- Dest.addCommand(new Command(JA, *this, Exec.c_str(), CmdArgs));
+ const char *Exec = getToolChain().getDriver().getClangProgramPath();
+ Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,