1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

Fix some size_t / uint32_t mismatched comparisons.

llvm-svn: 312278
This commit is contained in:
Zachary Turner 2017-08-31 20:50:25 +00:00
parent 14bb18182a
commit 0e2bd8153d

View File

@ -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());