remove a dead APInt ctor.
authorChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 04:58:58 +0000 (04:58 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 04:58:58 +0000 (04:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54869 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APInt.h
lib/Support/APFloat.cpp
lib/Support/APInt.cpp

index bf84cbb2c65386eb91df0345dff6f5436e4eed51..9e8119d7a365020f09510cc411a1453a9a9702c1 100644 (file)
@@ -19,8 +19,6 @@
 #include <cassert>
 #include <string>
 
-#define COMPILE_TIME_ASSERT(cond) extern int CTAssert[(cond) ? 1 : -1]
-
 namespace llvm {
   class Serializer;
   class Deserializer;
@@ -180,17 +178,6 @@ public:
   /// @brief Construct an APInt of numBits width, initialized as bigVal[].
   APInt(uint32_t numBits, uint32_t numWords, const uint64_t bigVal[]);
 
-  /// This constructor interprets Val as a string in the given radix. The 
-  /// interpretation stops when the first charater that is not suitable for the
-  /// radix is encountered. Acceptable radix values are 2, 8, 10 and 16. It is
-  /// an error for the value implied by the string to require more bits than 
-  /// numBits.
-  /// @param numBits the bit width of the constructed APInt
-  /// @param val the string to be interpreted
-  /// @param radix the radix of Val to use for the intepretation
-  /// @brief Construct an APInt from a string representation.
-  APInt(uint32_t numBits, const std::string& val, uint8_t radix);
-
   /// This constructor interprets the slen characters starting at StrStart as
   /// a string in the given radix. The interpretation stops when the first 
   /// character that is not suitable for the radix is encountered. Acceptable
index 0ee3d546b868ebde8c4ae9e8e216194fd0271df1..a6b7ed37587eac5ceda30e8fe290644428adfa41 100644 (file)
@@ -24,6 +24,7 @@ using namespace llvm;
 
 /* Assumed in hexadecimal significand parsing, and conversion to
    hexadecimal strings.  */
+#define COMPILE_TIME_ASSERT(cond) extern int CTAssert[(cond) ? 1 : -1]
 COMPILE_TIME_ASSERT(integerPartWidth % 4 == 0);
 
 namespace llvm {
index 167d56955e90048069cc882c526e27e0f3411199..d579ae0965b338eb84b934717fabe1b616f0e2e7 100644 (file)
@@ -94,14 +94,6 @@ APInt::APInt(uint32_t numbits, const char StrStart[], uint32_t slen,
   fromString(numbits, StrStart, slen, radix);
 }
 
-APInt::APInt(uint32_t numbits, const std::string& Val, uint8_t radix)
-  : BitWidth(numbits), VAL(0) {
-  assert(BitWidth >= MIN_INT_BITS && "bitwidth too small");
-  assert(BitWidth <= MAX_INT_BITS && "bitwidth too large");
-  assert(!Val.empty() && "String empty?");
-  fromString(numbits, Val.c_str(), (uint32_t)Val.size(), radix);
-}
-
 APInt::APInt(const APInt& that)
   : BitWidth(that.BitWidth), VAL(0) {
   assert(BitWidth >= MIN_INT_BITS && "bitwidth too small");
@@ -2122,6 +2114,7 @@ void APInt::dump() const
 
 /* Assumed by lowHalf, highHalf, partMSB and partLSB.  A fairly safe
    and unrestricting assumption.  */
+#define COMPILE_TIME_ASSERT(cond) extern int CTAssert[(cond) ? 1 : -1]
 COMPILE_TIME_ASSERT(integerPartWidth % 2 == 0);
 
 /* Some handy functions local to this file.  */