[llvm] r174375 - Fix remaining StringRef abuse.
Tim Northover
Tim.Northover at arm.com
Tue Feb 5 07:01:51 PST 2013
Author: tnorthover
Date: Tue Feb 5 09:01:51 2013
New Revision: 174375
URL: http://llvm.org/viewvc/llvm-project?rev=174375&view=rev
Log:
Fix remaining StringRef abuse.
This should fix the valgrind buildbot failure.
Modified:
llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
Modified: llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp?rev=174375&r1=174374&r2=174375&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp Tue Feb 5 09:01:51 2013
@@ -1442,8 +1442,8 @@ AArch64AsmParser::IdentifyRegister(unsig
// 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")
More information about the llvm-commits
mailing list