mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Sanity check error handling for TokenAlias.
llvm-svn: 154951
This commit is contained in:
parent
8b77bb6238
commit
d32ea4a8a9
@ -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