diff options
author | Tim Northover <Tim.Northover@arm.com> | 2013-02-05 15:01:51 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2013-02-05 15:01:51 +0000 |
commit | b9e1a33941d25faf54dc3ddec4be7f8f0750a155 (patch) | |
tree | e03d6f0903610e6b0852527923f3793e848cf42a /lib/Target/AArch64/AsmParser | |
parent | eb260b252749470654ef0655aa1d1334a4c0d983 (diff) |
Fix remaining StringRef abuse.
This should fix the valgrind buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AsmParser')
-rw-r--r-- | lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp index e15d135a46..69e4fc20bf 100644 --- a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -1442,8 +1442,8 @@ AArch64AsmParser::IdentifyRegister(unsigned &RegNum, SMLoc &RegEndLoc, // gives us a permanent string to use in the token (a pointer into LowerReg // would go out of scope when we return). LayoutLoc = SMLoc::getFromPointer(S.getPointer() + DotPos + 1); - Layout = LowerReg.substr(DotPos, StringRef::npos); - Layout = StringSwitch<const char *>(Layout) + std::string LayoutText = LowerReg.substr(DotPos, StringRef::npos); + Layout = StringSwitch<const char *>(LayoutText) .Case(".d", ".d").Case(".1d", ".1d").Case(".2d", ".2d") .Case(".s", ".s").Case(".2s", ".2s").Case(".4s", ".4s") .Case(".h", ".h").Case(".4h", ".4h").Case(".8h", ".8h") |