summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-09-13 18:01:20 +0000
committerCraig Topper <craig.topper@gmail.com>2015-09-13 18:01:20 +0000
commitb5c22252c04a15aaed7d754894d7dc1240aad5f3 (patch)
tree5d0688711240f255e7a1d6f2e9fbfc1a1064414b
parente461214fe1b8e35338b6ed9038c9c501fbc25000 (diff)
downloadbcm5719-llvm-b5c22252c04a15aaed7d754894d7dc1240aad5f3.tar.gz
bcm5719-llvm-b5c22252c04a15aaed7d754894d7dc1240aad5f3.zip
[TableGen] Simplify some code by using StringRef::find instead of std::find. NFC
llvm-svn: 247528
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 5e13d156b94..c12afccf337 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;
OpenPOWER on IntegriCloud