mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Sanity check error handling for TokenAlias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154951 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ab427334f5
commit
67cd20d039
@ -1329,6 +1329,9 @@ void AsmMatcherInfo::BuildInfo() {
|
||||
Record *Rec = AllTokenAliases[i];
|
||||
ClassInfo *FromClass = getTokenClass(Rec->getValueAsString("FromToken"));
|
||||
ClassInfo *ToClass = getTokenClass(Rec->getValueAsString("ToToken"));
|
||||
if (FromClass == ToClass)
|
||||
throw TGError(Rec->getLoc(),
|
||||
"error: Destination value identical to source value.");
|
||||
FromClass->SuperClasses.push_back(ToClass);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user