aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/APInt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h
index 39ce504aa9..2b2057c4d9 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.