Skip to content

Commit 9aa378d

Browse files
authored
[llvm] Fix 32bit build after change to implement S_INLINEES debug symbol (#67607)
#67490 broke 32bit builds by having mismatched types in a call to `std::min" This change standardizes on using `size_t` to avoid the mismatch.
1 parent 3ada774 commit 9aa378d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3597,22 +3597,22 @@ void CodeViewDebug::emitInlinees(
35973597
const SmallSet<codeview::TypeIndex, 1> &Inlinees) {
35983598
// Divide the list of inlinees into chunks such that each chunk fits within
35993599
// one record.
3600-
constexpr auto ChunkSize =
3600+
constexpr size_t ChunkSize =
36013601
(MaxRecordLength - sizeof(SymbolKind) - sizeof(uint32_t)) /
36023602
sizeof(uint32_t);
36033603

36043604
SmallVector<TypeIndex> SortedInlinees{Inlinees.begin(), Inlinees.end()};
36053605
llvm::sort(SortedInlinees);
36063606

3607-
uint64_t CurrentIndex = 0;
3607+
size_t CurrentIndex = 0;
36083608
while (CurrentIndex < SortedInlinees.size()) {
36093609
auto Symbol = beginSymbolRecord(SymbolKind::S_INLINEES);
36103610
auto CurrentChunkSize =
36113611
std::min(ChunkSize, SortedInlinees.size() - CurrentIndex);
36123612
OS.AddComment("Count");
36133613
OS.emitInt32(CurrentChunkSize);
36143614

3615-
const uint64_t CurrentChunkEnd = CurrentIndex + CurrentChunkSize;
3615+
const size_t CurrentChunkEnd = CurrentIndex + CurrentChunkSize;
36163616
for (; CurrentIndex < CurrentChunkEnd; ++CurrentIndex) {
36173617
OS.AddComment("Inlinee");
36183618
OS.emitInt32(SortedInlinees[CurrentIndex].getIndex());

0 commit comments

Comments
 (0)