[llvm] r212637 - Change an assert() to a diagnostic.

David Blaikie dblaikie at gmail.com
Wed Jul 9 12:31:43 PDT 2014


On Wed, Jul 9, 2014 at 11:55 AM, Jim Grosbach <grosbach at apple.com> wrote:
> Author: grosbach
> Date: Wed Jul  9 13:55:49 2014
> New Revision: 212637
>
> URL: http://llvm.org/viewvc/llvm-project?rev=212637&view=rev
> Log:
> Change an assert() to a diagnostic.

Guessing we don't actually bother with test cases for tablegen?

>
> Modified:
>     llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
>
> Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=212637&r1=212636&r2=212637&view=diff
> ==============================================================================
> --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
> +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Wed Jul  9 13:55:49 2014
> @@ -2119,9 +2119,11 @@ InferAllTypes(const StringMap<SmallVecto
>        // 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list