getActiveWords should return the number of words, not the index of the

highest active words. Increment its result by one.

llvm-svn: 34713
This commit is contained in:
Reid Spencer 2007-02-28 02:20:49 +00:00
parent 66d0d572c2
commit f8470272a7
1 changed files with 1 additions and 1 deletions

View File

@ -450,7 +450,7 @@ public:
/// APInt. This is used in conjunction with getActiveData to extract the raw
/// value of the APInt.
inline uint32_t getActiveWords() const {
return whichWord(getActiveBits()-1);
return whichWord(getActiveBits()-1) + 1;
}
/// This function returns a pointer to the internal storage of the APInt.