From: Jim Grosbach Date: Wed, 9 Jul 2014 18:55:49 +0000 (+0000) Subject: Change an assert() to a diagnostic. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f634247b1d953ec3d6eac29a520696242344976a;p=oota-llvm.git Change an assert() to a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212637 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 00bc9a5bbb9..2602bbcf6f6 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2119,9 +2119,11 @@ InferAllTypes(const StringMap > *InNamedTypes) { // 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 &InNodes = InNamedTypes->find(I->getKey())->second;