forked from OSchip/llvm-project
[ARM] Follow-up to fix crash "-target arm -mcpu=generic", without "-march="
Fix of dangling StringRef after temporary std::string is destroyed Follow-up to: http://reviews.llvm.org/rL248479 Reviewers: alexfh Subscribers: cfe-commits llvm-svn: 248480
This commit is contained in:
parent
2eef4b52cd
commit
a317dfb767
|
@ -6165,7 +6165,7 @@ StringRef arm::getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch,
|
|||
const llvm::Triple &Triple) {
|
||||
unsigned ArchKind;
|
||||
if (CPU == "generic") {
|
||||
StringRef ARMArch = tools::arm::getARMArch(Arch, Triple);
|
||||
std::string ARMArch = tools::arm::getARMArch(Arch, Triple);
|
||||
ArchKind = llvm::ARM::parseArch(ARMArch);
|
||||
if (ArchKind == llvm::ARM::AK_INVALID)
|
||||
// In case of generic Arch, i.e. "arm",
|
||||
|
|
Loading…
Reference in New Issue