[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h
Reid Spencer
reid at x10sys.com
Fri Mar 2 22:17:40 PST 2007
Changes in directory llvm/include/llvm/ADT:
APInt.h updated: 1.37 -> 1.38
---
Log message:
Make getNumWords public so that those using getRawData stand a chance of
not reading beyond the end of the buffer returned.
---
Diffs of the changes: (+7 -7)
APInt.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
Index: llvm/include/llvm/ADT/APInt.h
diff -u llvm/include/llvm/ADT/APInt.h:1.37 llvm/include/llvm/ADT/APInt.h:1.38
--- llvm/include/llvm/ADT/APInt.h:1.37 Fri Mar 2 23:37:23 2007
+++ llvm/include/llvm/ADT/APInt.h Sat Mar 3 00:17:23 2007
@@ -79,13 +79,6 @@
// Fast internal constructor
APInt(uint64_t* val, uint32_t bits) : BitWidth(bits), pVal(val) { }
- /// Here one word's bitwidth equals to that of uint64_t.
- /// @returns the number of words to hold the integer value of this APInt.
- /// @brief Get the number of words.
- inline uint32_t getNumWords() const {
- return (BitWidth + APINT_BITS_PER_WORD - 1) / APINT_BITS_PER_WORD;
- }
-
/// @returns true if the number of bits <= 64, false otherwise.
/// @brief Determine if this APInt just has one word to store value.
inline bool isSingleWord() const {
@@ -486,6 +479,13 @@
return whichWord(getActiveBits()-1) + 1;
}
+ /// Here one word's bitwidth equals to that of uint64_t.
+ /// @returns the number of words to hold the integer value of this APInt.
+ /// @brief Get the number of words.
+ inline uint32_t getNumWords() const {
+ return (BitWidth + APINT_BITS_PER_WORD - 1) / APINT_BITS_PER_WORD;
+ }
+
/// This function returns a pointer to the internal storage of the APInt.
/// This is useful for writing out the APInt in binary form without any
/// conversions.
More information about the llvm-commits
mailing list