[llvm-commits] [llvm] r54869 - in /llvm/trunk: include/llvm/ADT/APInt.h lib/Support/APFloat.cpp lib/Support/APInt.cpp

Chris Lattner sabre at nondot.org
Sat Aug 16 21:58:58 PDT 2008


Author: lattner
Date: Sat Aug 16 23:58:58 2008
New Revision: 54869

URL: http://llvm.org/viewvc/llvm-project?rev=54869&view=rev
Log:
remove a dead APInt ctor.

Modified:
    llvm/trunk/include/llvm/ADT/APInt.h
    llvm/trunk/lib/Support/APFloat.cpp
    llvm/trunk/lib/Support/APInt.cpp

Modified: llvm/trunk/include/llvm/ADT/APInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=54869&r1=54868&r2=54869&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/APInt.h (original)
+++ llvm/trunk/include/llvm/ADT/APInt.h Sat Aug 16 23:58:58 2008
@@ -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 @@
   /// @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

Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=54869&r1=54868&r2=54869&view=diff

==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Sat Aug 16 23:58:58 2008
@@ -24,6 +24,7 @@
 
 /* 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 {

Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=54869&r1=54868&r2=54869&view=diff

==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Sat Aug 16 23:58:58 2008
@@ -94,14 +94,6 @@
   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 @@
 
 /* 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.  */





More information about the llvm-commits mailing list