[llvm-commits] [llvm] r125792 - /llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Joerg Sonnenberger
joerg at bec.de
Thu Feb 17 15:22:19 PST 2011
Author: joerg
Date: Thu Feb 17 17:22:19 2011
New Revision: 125792
URL: http://llvm.org/viewvc/llvm-project?rev=125792&view=rev
Log:
Check that MnemonicAlias doesn't map back to the same string.
Modified:
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=125792&r1=125791&r2=125792&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Thu Feb 17 17:22:19 2011
@@ -1881,6 +1881,8 @@
AliasWithNoPredicate = i;
continue;
}
+ if (R->getValueAsString("ToMnemonic") == I->first)
+ throw TGError(R->getLoc(), "MnemonicAlias to the same string");
if (!MatchCode.empty())
MatchCode += "else ";
More information about the llvm-commits
mailing list