From b5c22252c04a15aaed7d754894d7dc1240aad5f3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 13 Sep 2015 18:01:20 +0000 Subject: [PATCH] [TableGen] Simplify some code by using StringRef::find instead of std::find. NFC llvm-svn: 247528 --- llvm/utils/TableGen/AsmMatcherEmitter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index 5e13d15..c12afcc 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -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; -- 2.7.4