File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
llvm/lib/DWARFLinker/Classic Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ static bool isTlsAddressCode(uint8_t DW_OP_Code) {
415415
416416static void constructSeqOffsettoOrigRowMapping (
417417 CompileUnit &Unit, const DWARFDebugLine::LineTable <,
418- DenseMap<size_t , unsigned > &SeqOffToOrigRow) {
418+ DenseMap<uint64_t , unsigned > &SeqOffToOrigRow) {
419419
420420 // Use std::map for ordered iteration.
421421 std::map<uint64_t , unsigned > LineTableMapping;
@@ -476,13 +476,14 @@ static void constructSeqOffsettoOrigRowMapping(
476476 LineTableMapping[DummyKey] = DummyVal;
477477
478478 for (auto [NextSeqOff, NextRow] : LineTableMapping) {
479- auto StmtAttrSmallerThanNext = [NextSeqOff](const PatchLocation &SA) {
480- return SA.get () < NextSeqOff;
479+ // Explict capture to avoid capturing structured bindings and make C++17
480+ // happy.
481+ auto StmtAttrSmallerThanNext = [N = NextSeqOff](const PatchLocation &SA) {
482+ return SA.get () < N;
481483 };
482- auto SeqStartSmallerThanNext = [NextRow](const size_t &Row) {
483- return Row < NextRow ;
484+ auto SeqStartSmallerThanNext = [N = NextRow](const size_t &Row) {
485+ return Row < N ;
484486 };
485-
486487 // If both StmtAttrs and SeqStartRows points to value not in
487488 // the LineTableMapping yet, we do a dummy one to one mapping and
488489 // move the pointer.
You can’t perform that action at this time.
0 commit comments