[llvm] r244493 - [TableGen] NFC improving comments about what the tokenized identifiers will contain.
Colin LeMahieu via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 12:58:06 PDT 2015
Author: colinl
Date: Mon Aug 10 14:58:06 2015
New Revision: 244493
URL: http://llvm.org/viewvc/llvm-project?rev=244493&view=rev
Log:
[TableGen] NFC improving comments about what the tokenized identifiers will contain.
Modified:
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=244493&r1=244492&r2=244493&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Mon Aug 10 14:58:06 2015
@@ -884,12 +884,13 @@ void MatchableInfo::tokenizeAsmString(co
InTok = false;
}
- // If this isn't "${", treat like a normal token.
+ // If this isn't "${", start new identifier looking like "$xxx"
if (i + 1 == String.size() || String[i + 1] != '{') {
Prev = i;
break;
}
+ // 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();
More information about the llvm-commits
mailing list