1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

catch unnamed inputs

llvm-svn: 23360
This commit is contained in:
Chris Lattner 2005-09-14 22:06:36 +00:00
parent f749a0ef7c
commit a6a0d51065

View File

@ -631,7 +631,15 @@ void DAGISelEmitter::ParseAndResolvePatternFragments(std::ostream &OS) {
static void HandleUse(TreePattern *I, TreePatternNode *Pat,
std::map<std::string, TreePatternNode*> &InstInputs) {
// No name -> not interesting.
if (Pat->getName().empty()) return;
if (Pat->getName().empty()) {
if (Pat->isLeaf()) {
DefInit *DI = dynamic_cast<DefInit*>(Pat->getLeafValue());
if (DI && DI->getDef()->isSubClassOf("RegisterClass"))
I->error("Input " + DI->getDef()->getName() + " must be named!");
}
return;
}
Record *Rec;
if (Pat->isLeaf()) {