llvm.org GIT mirror llvm / 1343fbc
Remove some unnecessary temporary strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194335 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 6 years ago
2 changed file(s) with 5 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
14901490
14911491 // The optional operand must be "lsl #N" where N is non-negative.
14921492 if (Parser.getTok().is(AsmToken::Identifier)
1493 && Parser.getTok().getIdentifier().lower() == "lsl") {
1493 && Parser.getTok().getIdentifier().equals_lower("lsl")) {
14941494 Parser.Lex();
14951495
14961496 if (Parser.getTok().is(AsmToken::Hash)) {
15471547 return MatchOperand_ParseFail;
15481548 }
15491549
1550 std::string LowerTok = Parser.getTok().getIdentifier().lower();
1551 StringRef Tok(LowerTok);
1552 if (Tok[0] != 'c') {
1550 StringRef Tok = Parser.getTok().getIdentifier();
1551 if (Tok[0] != 'c' && Tok[0] != 'C') {
15531552 Error(S, "Expected cN operand where 0 <= N <= 15");
15541553 return MatchOperand_ParseFail;
15551554 }
16351634 // gives us a permanent string to use in the token (a pointer into LowerReg
16361635 // would go out of scope when we return).
16371636 LayoutLoc = SMLoc::getFromPointer(S.getPointer() + DotPos + 1);
1638 std::string LayoutText = LowerReg.substr(DotPos, StringRef::npos);
1637 StringRef LayoutText = StringRef(LowerReg).substr(DotPos);
16391638
16401639 // See if it's a 128-bit layout first.
16411640 Layout = StringSwitch(LayoutText)
35483548 if (Tok.is(AsmToken::Identifier)) {
35493549 StringRef OptStr = Tok.getString();
35503550
3551 if (OptStr.lower() == "sy")
3551 if (OptStr.equals_lower("sy"))
35523552 Opt = ARM_ISB::SY;
35533553 else
35543554 return MatchOperand_NoMatch;