[llvm-commits] [llvm] r159540 - /llvm/trunk/include/llvm/Support/IntegersSubset.h

Stepan Dyatkovskiy stpworld at narod.ru
Mon Jul 2 10:42:47 PDT 2012


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?!");
+      return false;
     }
 
     const IntType& getLow() const {





More information about the llvm-commits mailing list