diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 39ce504aa97..2b2057c4d9a 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -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.