Skip to content

Commit b47cd7a

Browse files
committed
[DWARFLink] Hot fix llvm#149618 by removing some C++20 features
Some C++20 features are used in it, it may cause come CI to fail Signed-off-by: Peter Rong <[email protected]>
1 parent 2b2f579 commit b47cd7a

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,18 @@ static void constructSeqOffsettoOrigRowMapping(
475475
constexpr unsigned DummyVal = UINT32_MAX;
476476
LineTableMapping[DummyKey] = DummyVal;
477477

478-
for (auto [NextSeqOff, NextRow] : LineTableMapping) {
479-
auto StmtAttrSmallerThanNext = [NextSeqOff](const PatchLocation &SA) {
480-
return SA.get() < NextSeqOff;
481-
};
482-
auto SeqStartSmallerThanNext = [NextRow](const size_t &Row) {
483-
return Row < NextRow;
484-
};
478+
uint64_t NextSeqOff = 0;
479+
unsigned NextRow = 0;
480+
auto StmtAttrSmallerThanNext = [&](const PatchLocation &SA) {
481+
return SA.get() < NextSeqOff;
482+
};
483+
auto SeqStartSmallerThanNext = [&](const size_t &Row) {
484+
return Row < NextRow;
485+
};
486+
487+
for (auto It : LineTableMapping) {
488+
NextSeqOff = It.first;
489+
NextRow = It.second;
485490

486491
// If both StmtAttrs and SeqStartRows points to value not in
487492
// the LineTableMapping yet, we do a dummy one to one mapping and

0 commit comments

Comments
 (0)