Fix heap use after free introduced by r306769.

llvm-svn: 306804
This commit is contained in:
Daniel Jasper 2017-06-30 08:02:37 +00:00
parent 8d26f0a602
commit d27538a70e
1 changed files with 1 additions and 1 deletions

View File

@ -1319,7 +1319,7 @@ void Clang::AddARMTargetArgs(const llvm::Triple &Triple, const ArgList &Args,
if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ))
ABIName = A->getValue();
else {
StringRef CPU = getCPUName(Args, Triple, /*FromAs*/ false);
std::string CPU = getCPUName(Args, Triple, /*FromAs*/ false);
ABIName = llvm::ARM::computeDefaultTargetABI(Triple, CPU).data();
}