mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +00:00
[ARM64] Fix a heap-use-after-free spotted by ASan.
StringRef::lower() returns a std::string. Better yet, we can now stop thinking about what it returns and write 'auto'. It does the right thing. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bcf0c5fd73
commit
1f408b1474
@ -2653,7 +2653,7 @@ ARM64AsmParser::tryParseSystemRegister(OperandVector &Operands) {
|
||||
if (Tok.isNot(AsmToken::Identifier))
|
||||
return MatchOperand_NoMatch;
|
||||
|
||||
StringRef ID = Tok.getString().lower();
|
||||
auto ID = Tok.getString().lower();
|
||||
ARM64SYS::SystemRegister Reg =
|
||||
StringSwitch<ARM64SYS::SystemRegister>(ID)
|
||||
.Case("spsr_el1", ARM64SYS::SPSR_svc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user