[llvm-commits] [PATCH] Asserts never trip
Chad Rosier
mcrosier at apple.com
Tue Jun 7 13:47:43 PDT 2011
Thanks Cameron. Committed revision 132732.
Chad
On Jun 7, 2011, at 9:56 AM, Cameron McInally wrote:
> Hey guys,
>
> I found a few asserts for illegal paths that should always trip, but
> currently never trip:
>
> mcinally/llvm> svn diff
> Index: utils/TableGen/FastISelEmitter.cpp
> ===================================================================
> --- utils/TableGen/FastISelEmitter.cpp (revision 132714)
> +++ utils/TableGen/FastISelEmitter.cpp (working copy)
> @@ -278,7 +278,7 @@
> } else if (Operands[i].isFP()) {
> OS << "ConstantFP *f" << i;
> } else {
> - assert("Unknown operand kind!");
> + assert(0 && "Unknown operand kind!");
> abort();
> }
> if (i + 1 != e)
> @@ -307,7 +307,7 @@
> OS << "f" << i;
> PrintedArg = true;
> } else {
> - assert("Unknown operand kind!");
> + assert(0 && "Unknown operand kind!");
> abort();
> }
> }
> @@ -322,7 +322,7 @@
> } else if (Operands[i].isFP()) {
> OS << "f" << i;
> } else {
> - assert("Unknown operand kind!");
> + assert(0 && "Unknown operand kind!");
> abort();
> }
> if (i + 1 != e)
>
>
> Tx,
> Cameron
> _______________________________________________
> 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