projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bd7889
)
[TableGen] Simplify some code by using StringRef::find instead of std::find. NFC
author
Craig Topper
<craig.topper@gmail.com>
Sun, 13 Sep 2015 18:01:20 +0000
(18:01 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Sun, 13 Sep 2015 18:01:20 +0000
(18:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247528
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/AsmMatcherEmitter.cpp
patch
|
blob
|
history
diff --git
a/utils/TableGen/AsmMatcherEmitter.cpp
b/utils/TableGen/AsmMatcherEmitter.cpp
index 5e13d156b94137100c6e6febb747000e8bcd7fff..c12afccf337ed545cd6b21f58488e2e8ca235f13 100644
(file)
--- a/
utils/TableGen/AsmMatcherEmitter.cpp
+++ b/
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(End
Pos != StringRef::npos &&
+
"Missing brace in operand reference!"
);
addAsmOperand(i, EndPos+1);
Prev = EndPos + 1;
i = EndPos;