mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-27 05:32:22 +00:00
pass literals like $$1 through to the asm matcher. This isn't right yet, but doesn't hurt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
17671510a7
commit
7ad3147f98
@ -629,20 +629,16 @@ void MatchableInfo::TokenizeAsmString(const AsmMatcherInfo &Info) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '$': {
|
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) {
|
if (InTok) {
|
||||||
AsmOperands.push_back(AsmOperand(String.slice(Prev, i)));
|
AsmOperands.push_back(AsmOperand(String.slice(Prev, i)));
|
||||||
InTok = false;
|
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(),'}');
|
StringRef::iterator End = std::find(String.begin() + i, String.end(),'}');
|
||||||
assert(End != String.end() && "Missing brace in operand reference!");
|
assert(End != String.end() && "Missing brace in operand reference!");
|
||||||
@ -1122,6 +1118,11 @@ void AsmMatcherInfo::BuildInfo() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Token.size() > 1 && isdigit(Token[1])) {
|
||||||
|
Op.Class = getTokenClass(Token);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise this is an operand reference.
|
// Otherwise this is an operand reference.
|
||||||
StringRef OperandName;
|
StringRef OperandName;
|
||||||
if (Token[1] == '{')
|
if (Token[1] == '{')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user