Skip to content

Commit

Permalink
[TableGen] Simplify some code by using StringRef::find instead of std…
Browse files Browse the repository at this point in the history
…::find. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247528 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
topperc committed Sep 13, 2015
1 parent 9bd7889 commit 25e88be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/TableGen/AsmMatcherEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,9 +891,9 @@ void MatchableInfo::tokenizeAsmString(const AsmMatcherInfo &Info) {
}

// If this is "${" find the next "}" and make an identifier like "${xxx}"
StringRef::iterator End = std::find(String.begin() + i, String.end(),'}');
assert(End != String.end() && "Missing brace in operand reference!");
size_t EndPos = End - String.begin();
size_t EndPos = String.find('}', i);
assert(EndPos != StringRef::npos &&
"Missing brace in operand reference!");
addAsmOperand(i, EndPos+1);
Prev = EndPos + 1;
i = EndPos;
Expand Down

0 comments on commit 25e88be

Please sign in to comment.