From: Joerg Sonnenberger Date: Thu, 17 Feb 2011 23:22:19 +0000 (+0000) Subject: Check that MnemonicAlias doesn't map back to the same string. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6ef6ceda6883d0ee543d8da86d16b0fcdcecab96;p=oota-llvm.git 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 --- diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 35f5f6facc4..e3def418523 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 ";