Add a private constructor for efficiency.

llvm-svn: 34580
This commit is contained in:
Reid Spencer 2007-02-25 07:29:03 +00:00
parent d6b853ad1b
commit 16f043a12a
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,7 @@ namespace APIntOps {
/// @brief Class for arbitrary precision integers. /// @brief Class for arbitrary precision integers.
class APInt { class APInt {
public: public:
uint32_t BitWidth; ///< The number of bits in this APInt. uint32_t BitWidth; ///< The number of bits in this APInt.
/// This union is used to store the integer value. When the /// This union is used to store the integer value. When the
@ -76,6 +77,9 @@ public:
APINT_WORD_SIZE = sizeof(uint64_t) 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. /// Here one word's bitwidth equals to that of uint64_t.
/// @returns the number of words to hold the integer value of this APInt. /// @returns the number of words to hold the integer value of this APInt.
/// @brief Get the number of words. /// @brief Get the number of words.