// If we have input named node types, propagate their types to the named
// values here.
if (InNamedTypes) {
- // FIXME: Should be error?
- assert(InNamedTypes->count(I->getKey()) &&
- "Named node in output pattern but not input pattern?");
+ if (!InNamedTypes->count(I->getKey())) {
+ error("Node '" + std::string(I->getKey()) +
+ "' in output pattern but not input pattern");
+ return true;
+ }
const SmallVectorImpl<TreePatternNode*> &InNodes =
InNamedTypes->find(I->getKey())->second;