mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
TableGen: Assembly matcher 'insufficient operands' diagnostic.
Make sure the tblgen'erated asm matcher correctly returns numoperands+1 as the ErrorInfo when the problem was that there weren't enough operands specified. rdar://9142751 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160144 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
94e36e34e2
commit
151d81d1e7
@ -2649,6 +2649,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
|
||||
OS << " for (unsigned i = 0; i != " << MaxNumOperands << "; ++i) {\n";
|
||||
OS << " if (i + 1 >= Operands.size()) {\n";
|
||||
OS << " OperandsValid = (it->Classes[i] == " <<"InvalidMatchClass);\n";
|
||||
OS << " if (!OperandsValid) ErrorInfo = i + 1;\n;";
|
||||
OS << " break;\n";
|
||||
OS << " }\n";
|
||||
OS << " unsigned Diag = validateOperandClass(Operands[i+1],\n";
|
||||
|
Loading…
Reference in New Issue
Block a user