Author: djasper Date: Fri Jun 30 01:02:37 2017 New Revision: 306804 URL: http://llvm.org/viewvc/llvm-project?rev=306804&view=rev Log: Fix heap use after free introduced by r306769.
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=306804&r1=306803&r2=306804&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri Jun 30 01:02:37 2017 @@ -1319,7 +1319,7 @@ void Clang::AddARMTargetArgs(const llvm: 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(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits