[llvm-commits] [llvm] r132732 - /llvm/trunk/utils/TableGen/FastISelEmitter.cpp

David Blaikie dblaikie at gmail.com
Fri Jun 10 01:16:03 PDT 2011


>
>       } else if (Operands[i].isFP()) {
>         OS << "f" << i;
>       } else {
> -        assert("Unknown operand kind!");
> -        abort();
> +        llvm_unreachable("Unknown operand kind!");
>       }
>       if (i + 1 != e)
>         OS << ", ";
>

Just wondering about coding conventions - would it be more appropriate to
change this from:
  else if (cond) { ... } else { /* unreachable */ }
to:
  else { assert(cond); ... };
This would be marginally more efficient in release builds, potentially.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110610/6ce4071c/attachment.html>


More information about the llvm-commits mailing list