forked from OSchip/llvm-project
[TableGen] Use a StringRef instead of creating a new std::string. It gets passed to a function that takes a StringRef anyway. NFC
llvm-svn: 258007
This commit is contained in:
parent
ede597c753
commit
e8453b0d88
|
@ -120,8 +120,7 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned CGIIndex,
|
|||
|
||||
while (VarEnd < AsmString.size() && isIdentChar(AsmString[VarEnd]))
|
||||
++VarEnd;
|
||||
std::string VarName(AsmString.begin()+DollarPos+1,
|
||||
AsmString.begin()+VarEnd);
|
||||
StringRef VarName(AsmString.data()+DollarPos+1, VarEnd-DollarPos-1);
|
||||
|
||||
// Modifier - Support ${foo:modifier} syntax, where "modifier" is passed
|
||||
// into printOperand. Also support ${:feature}, which is passed into
|
||||
|
@ -143,7 +142,7 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned CGIIndex,
|
|||
PrintFatalError("Reached end of string before terminating curly brace in '"
|
||||
+ CGI.TheDef->getName() + "'");
|
||||
|
||||
unsigned ModifierStart = VarEnd;
|
||||
std::string::size_type ModifierStart = VarEnd;
|
||||
while (VarEnd < AsmString.size() && isIdentChar(AsmString[VarEnd]))
|
||||
++VarEnd;
|
||||
Modifier = std::string(AsmString.begin()+ModifierStart,
|
||||
|
|
Loading…
Reference in New Issue