[llvm] r312278 - Fix some size_t / uint32_t mismatched comparisons.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 13:50:25 PDT 2017


Author: zturner
Date: Thu Aug 31 13:50:25 2017
New Revision: 312278

URL: http://llvm.org/viewvc/llvm-project?rev=312278&view=rev
Log:
Fix some size_t / uint32_t mismatched comparisons.

Modified:
    llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp

Modified: llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp?rev=312278&r1=312277&r2=312278&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp Thu Aug 31 13:50:25 2017
@@ -716,18 +716,18 @@ Error DumpOutputStyle::dumpUdtStats() {
   }
 
   LongestNamespace += StringRef(" namespace ''").size();
-  uint32_t LongestTypeLeafKind = getLongestTypeLeafName(UdtTargetStats);
-  uint32_t FieldWidth = std::max(LongestNamespace, LongestTypeLeafKind);
+  size_t LongestTypeLeafKind = getLongestTypeLeafName(UdtTargetStats);
+  size_t FieldWidth = std::max(LongestNamespace, LongestTypeLeafKind);
 
   // Compute the max number of digits for count and size fields, including comma
   // separators.
   StringRef CountHeader("Count");
   StringRef SizeHeader("Size");
-  uint32_t CD = NumDigits(UdtStats.Totals.Count);
+  size_t CD = NumDigits(UdtStats.Totals.Count);
   CD += (CD - 1) / 3;
   CD = std::max(CD, CountHeader.size());
 
-  uint32_t SD = NumDigits(UdtStats.Totals.Size);
+  size_t SD = NumDigits(UdtStats.Totals.Size);
   SD += (SD - 1) / 3;
   SD = std::max(SD, SizeHeader.size());
 




More information about the llvm-commits mailing list