Fix potential use after free.

llvm-svn: 147277
This commit is contained in:
Benjamin Kramer 2011-12-26 14:18:37 +00:00
parent 9a3f299f0e
commit eed4f2a6c5
1 changed files with 1 additions and 2 deletions

View File

@ -800,9 +800,8 @@ void Clang::AddSparcTargetArgs(const ArgList &Args,
const Driver &D = getToolChain().getDriver();
if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
StringRef MArch = A->getValue(Args);
CmdArgs.push_back("-target-cpu");
CmdArgs.push_back(MArch.str().c_str());
CmdArgs.push_back(A->getValue(Args));
}
// Select the float ABI as determined by -msoft-float, -mhard-float, and