Skip to content

Commit 7ca4632

Browse files
committed
[DWARFLinker] Fix previous build errors
Signed-off-by: Peter Rong <[email protected]>
1 parent d545b0e commit 7ca4632

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ static bool isTlsAddressCode(uint8_t DW_OP_Code) {
415415

416416
static void constructSeqOffsettoOrigRowMapping(
417417
CompileUnit &Unit, const DWARFDebugLine::LineTable &LT,
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.

0 commit comments

Comments
 (0)