[llvm-commits] [llvm] r159540 - /llvm/trunk/include/llvm/Support/IntegersSubset.h
David Blaikie
dblaikie at gmail.com
Mon Jul 2 11:10:10 PDT 2012
On Mon, Jul 2, 2012 at 10:42 AM, Stepan Dyatkovskiy <stpworld at narod.ru> wrote:
> Author: dyatkovskiy
> Date: Mon Jul 2 12:42:46 2012
> New Revision: 159540
>
> URL: http://llvm.org/viewvc/llvm-project?rev=159540&view=rev
> Log:
> Fixed switch in IntRange::isSingleNumber method.
>
> Modified:
> llvm/trunk/include/llvm/Support/IntegersSubset.h
>
> Modified: llvm/trunk/include/llvm/Support/IntegersSubset.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IntegersSubset.h?rev=159540&r1=159539&r2=159540&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/IntegersSubset.h (original)
> +++ llvm/trunk/include/llvm/Support/IntegersSubset.h Mon Jul 2 12:42:46 2012
> @@ -210,7 +210,7 @@
> return true;
> case RANGE:
> return false;
> - default: // UNKNOWN
> + case UNKNOWN:
> if (Low == High) {
> const_cast<Type&>(RangeType) = SINGLE_NUMBER;
> return true;
> @@ -218,6 +218,8 @@
> const_cast<Type&>(RangeType) = RANGE;
> return false;
> }
> + assert(!"Unknown state?!");
llvm_unreachable would be the right thing here (& you can/should
remove the return statement then too)
> + return false;
> }
>
> const IntType& getLow() const {
>
>
> _______________________________________________
> 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