summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM64
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-30 09:08:07 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-30 09:08:07 +0000
commit81f706106518573612a870e4836f54366084cd9b (patch)
treef3f4e0415de3d7a3c49f2b210bad2d8f00cdd1fa /llvm/lib/Target/ARM64
parentbf679cec677de9b6288ae346aeeca74c9aabc28a (diff)
downloadbcm5719-llvm-81f706106518573612a870e4836f54366084cd9b.tar.gz
bcm5719-llvm-81f706106518573612a870e4836f54366084cd9b.zip
[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. =] llvm-svn: 205135
Diffstat (limited to 'llvm/lib/Target/ARM64')
-rw-r--r--llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
index e72189e766a..705d192356e 100644
--- a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
+++ b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
@@ -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)
OpenPOWER on IntegriCloud