pass literals like $$1 through to the asm matcher. This isn't right yet, but doesn't hurt.

llvm-svn: 118359
This commit is contained in:
Chris Lattner 2010-11-06 22:06:03 +00:00
parent 2abbeded98
commit d6746d5b46
1 changed files with 11 additions and 10 deletions

View File

@ -629,20 +629,16 @@ void MatchableInfo::TokenizeAsmString(const AsmMatcherInfo &Info) {
break;
case '$': {
// If this isn't "${", treat like a normal token.
if (i + 1 == String.size() || String[i + 1] != '{') {
if (InTok) {
AsmOperands.push_back(AsmOperand(String.slice(Prev, i)));
InTok = false;
}
Prev = i;
break;
}
if (InTok) {
AsmOperands.push_back(AsmOperand(String.slice(Prev, i)));
InTok = false;
}
// If this isn't "${", treat like a normal token.
if (i + 1 == String.size() || String[i + 1] != '{') {
Prev = i;
break;
}
StringRef::iterator End = std::find(String.begin() + i, String.end(),'}');
assert(End != String.end() && "Missing brace in operand reference!");
@ -1122,6 +1118,11 @@ void AsmMatcherInfo::BuildInfo() {
continue;
}
if (Token.size() > 1 && isdigit(Token[1])) {
Op.Class = getTokenClass(Token);
continue;
}
// Otherwise this is an operand reference.
StringRef OperandName;
if (Token[1] == '{')