llvm.org GIT mirror llvm / 67cd20d
Sanity check error handling for TokenAlias. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154951 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Grosbach 8 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
13281328 Record *Rec = AllTokenAliases[i];
13291329 ClassInfo *FromClass = getTokenClass(Rec->getValueAsString("FromToken"));
13301330 ClassInfo *ToClass = getTokenClass(Rec->getValueAsString("ToToken"));
1331 if (FromClass == ToClass)
1332 throw TGError(Rec->getLoc(),
1333 "error: Destination value identical to source value.");
13311334 FromClass->SuperClasses.push_back(ToClass);
13321335 }
13331336