]> granicus.if.org Git - clang/commitdiff
[APInt] Remove references to integerPartWidth and integerPart outside of APFloat...
authorCraig Topper <craig.topper@gmail.com>
Thu, 30 Mar 2017 05:48:58 +0000 (05:48 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 30 Mar 2017 05:48:58 +0000 (05:48 +0000)
Turns out integerPartWidth only explicitly defines the width of the tc functions in the APInt class. Functions that aren't used by APInt implementation itself. Many places in the code base already assume APInt is made up of 64-bit pieces. Explicitly assuming 64-bit here doesn't make that situation much worse. A full audit would need to be done if it ever changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299058 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ItaniumMangle.cpp

index dd99f2087f81a3570f02cdd8d0b8a8fd96eb7c4e..29fcdd7be924559cf3b3aebb4e48e19b5c3dcebc 100644 (file)
@@ -982,9 +982,8 @@ void CXXNameMangler::mangleFloat(const llvm::APFloat &f) {
     unsigned digitBitIndex = 4 * (numCharacters - stringIndex - 1);
 
     // Project out 4 bits starting at 'digitIndex'.
-    llvm::integerPart hexDigit
-      = valueBits.getRawData()[digitBitIndex / llvm::integerPartWidth];
-    hexDigit >>= (digitBitIndex % llvm::integerPartWidth);
+    uint64_t hexDigit = valueBits.getRawData()[digitBitIndex / 64];
+    hexDigit >>= (digitBitIndex % 64);
     hexDigit &= 0xF;
 
     // Map that over to a lowercase hex digit.