summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-01-06 19:20:32 +0000
committerCraig Topper <craig.topper@intel.com>2018-01-06 19:20:32 +0000
commitad89541ae9e1877fe3b30820ba65595351c38cff (patch)
treea945eca3bd9fe2a64cbbc33b2c61c7eb1414a84f /llvm/utils/TableGen
parentae20590c17390c438957584e633d0c48f1fbeb8e (diff)
downloadbcm5719-llvm-ad89541ae9e1877fe3b30820ba65595351c38cff.tar.gz
bcm5719-llvm-ad89541ae9e1877fe3b30820ba65595351c38cff.zip
[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
Diffstat (limited to 'llvm/utils/TableGen')
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index f2d304bfcf5..b3b670b8a4b 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -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 << " - ";
OpenPOWER on IntegriCloud