[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

Reid Spencer reid at x10sys.com
Sat Feb 24 23:29:20 PST 2007



Changes in directory llvm/include/llvm/ADT:

APInt.h updated: 1.17 -> 1.18
---
Log message:

Add a private constructor for efficiency.


---
Diffs of the changes:  (+4 -0)

 APInt.h |    4 ++++
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/ADT/APInt.h
diff -u llvm/include/llvm/ADT/APInt.h:1.17 llvm/include/llvm/ADT/APInt.h:1.18
--- llvm/include/llvm/ADT/APInt.h:1.17	Sat Feb 24 03:50:13 2007
+++ llvm/include/llvm/ADT/APInt.h	Sun Feb 25 01:29:03 2007
@@ -60,6 +60,7 @@
 /// @brief Class for arbitrary precision integers.
 class APInt {
 public:
+
   uint32_t BitWidth;      ///< The number of bits in this APInt.
 
   /// This union is used to store the integer value. When the
@@ -76,6 +77,9 @@
     APINT_WORD_SIZE = sizeof(uint64_t)
   };
 
+  // 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.






More information about the llvm-commits mailing list