Add DebugLoc field and simple accessors.
[oota-llvm.git] / include / llvm / CodeGen / ValueTypes.h
index 1a08f4d6086e4c6debd31709c748c5249852038a..2846eb02db284cd19cc167e2d70510bdc5857b1e 100644 (file)
@@ -444,8 +444,11 @@ namespace llvm {
     /// getIntegerVTBitMask - Return an integer with 1's every place there are
     /// bits in the specified integer value type. FIXME: Should return an apint.
     uint64_t getIntegerVTBitMask() const {
-      assert(isInteger() && !isVector() && "Only applies to int scalars!");
-      return ~uint64_t(0UL) >> (64-getSizeInBits());
+      assert(isInteger() && "Only applies to integers!");
+      MVT EltVT = isVector() ? getVectorElementType() : *this;
+      assert(EltVT.getSizeInBits() <= 64 &&
+             "getIntegerVTBitMask doesn't use APInt!");
+      return ~uint64_t(0UL) >> (64-EltVT.getSizeInBits());
     }
 
     /// getIntegerVTSignBit - Return an integer with a 1 in the position of the