aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2011-02-17 23:22:19 +0000
committerJoerg Sonnenberger <joerg@bec.de>2011-02-17 23:22:19 +0000
commit6ef6ceda6883d0ee543d8da86d16b0fcdcecab96 (patch)
tree8157a69eb41bce515ba09a448da17ce1f015d179
parentc8cb8ef9c2d5e354db661022d707a19b3533c00e (diff)
Check that MnemonicAlias doesn't map back to the same string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125792 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/AsmMatcherEmitter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp
index 35f5f6facc..e3def41852 100644
--- a/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/utils/TableGen/AsmMatcherEmitter.cpp
@@ -1881,6 +1881,8 @@ static bool EmitMnemonicAliases(raw_ostream &OS, const AsmMatcherInfo &Info) {
AliasWithNoPredicate = i;
continue;
}
+ if (R->getValueAsString("ToMnemonic") == I->first)
+ throw TGError(R->getLoc(), "MnemonicAlias to the same string");
if (!MatchCode.empty())
MatchCode += "else ";