forked from OSchip/llvm-project
[TableGen] Make the ambiguous match debug messages from the AsmMatcherEmitter slightly more useful.
Don't report ambiguous matches on different variants. Print the variant number in the output. llvm-svn: 321938
This commit is contained in:
parent
ae20590c17
commit
ad89541ae9
|
@ -620,6 +620,10 @@ struct MatchableInfo {
|
|||
if (Mnemonic != RHS.Mnemonic)
|
||||
return false;
|
||||
|
||||
// Different variants can't conflict.
|
||||
if (AsmVariantID != RHS.AsmVariantID)
|
||||
return false;
|
||||
|
||||
// The number of operands is unambiguous.
|
||||
if (AsmOperands.size() != RHS.AsmOperands.size())
|
||||
return false;
|
||||
|
@ -770,6 +774,8 @@ public:
|
|||
LLVM_DUMP_METHOD void MatchableInfo::dump() const {
|
||||
errs() << TheDef->getName() << " -- " << "flattened:\"" << AsmString <<"\"\n";
|
||||
|
||||
errs() << " variant: " << AsmVariantID << "\n";
|
||||
|
||||
for (unsigned i = 0, e = AsmOperands.size(); i != e; ++i) {
|
||||
const AsmOperand &Op = AsmOperands[i];
|
||||
errs() << " op[" << i << "] = " << Op.Class->ClassName << " - ";
|
||||
|
|
Loading…
Reference in New Issue