forked from OSchip/llvm-project
[TableGen] Simplify some code by using StringRef::find instead of std::find. NFC
llvm-svn: 247528
This commit is contained in:
parent
e461214fe1
commit
b5c22252c0
|
@ -891,9 +891,9 @@ void MatchableInfo::tokenizeAsmString(const AsmMatcherInfo &Info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is "${" find the next "}" and make an identifier like "${xxx}"
|
// If this is "${" find the next "}" and make an identifier like "${xxx}"
|
||||||
StringRef::iterator End = std::find(String.begin() + i, String.end(),'}');
|
size_t EndPos = String.find('}', i);
|
||||||
assert(End != String.end() && "Missing brace in operand reference!");
|
assert(EndPos != StringRef::npos &&
|
||||||
size_t EndPos = End - String.begin();
|
"Missing brace in operand reference!");
|
||||||
addAsmOperand(i, EndPos+1);
|
addAsmOperand(i, EndPos+1);
|
||||||
Prev = EndPos + 1;
|
Prev = EndPos + 1;
|
||||||
i = EndPos;
|
i = EndPos;
|
||||||
|
|
Loading…
Reference in New Issue