aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 14744998f1..f423d4e3b9 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1489,8 +1489,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddAllArgs(CmdArgs, options::OPT_undef);
- const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath("clang"));
+ std::string Exec = getToolChain().getDriver().getClangProgramPath();
// Optionally embed the -cc1 level arguments into the debug info, for build
// analysis.
@@ -1510,7 +1509,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(Flags.str()));
}
- Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ Dest.addCommand(new Command(JA, *this, Exec.c_str(), CmdArgs));
// Explicitly warn that these options are unsupported, even though
// we are allowing compilation to continue.
@@ -1589,9 +1588,8 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Input.getFilename());
}
- const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath("clang"));
- Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ std::string Exec = getToolChain().getDriver().getClangProgramPath();
+ Dest.addCommand(new Command(JA, *this, Exec.c_str(), CmdArgs));
}
void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,