Skip to content

Revert "[DWARFLinker] Use different addresses to distinguish invalid … #149422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ namespace llvm {
using namespace dwarf_linker;
using namespace dwarf_linker::classic;

enum InvalidStmtSeqOffset {
MaxStmtSeqOffset = UINT64_MAX,
OrigOffsetMissing = MaxStmtSeqOffset - 1,
NewOffsetMissing = MaxStmtSeqOffset - 2,
};

/// Hold the input and output of the debug info size in bytes.
struct DebugInfoSize {
uint64_t Input;
Expand Down Expand Up @@ -2321,7 +2315,7 @@ void DWARFLinker::DIECloner::generateLineTableForUnit(CompileUnit &Unit) {
// Some sequences are discarded by the DWARFLinker if they are invalid
// (empty).
if (OrigRowIter == SeqOffToOrigRow.end()) {
StmtSeq.set(OrigOffsetMissing);
StmtSeq.set(UINT64_MAX);
continue;
}
size_t OrigRowIndex = OrigRowIter->second;
Expand All @@ -2331,7 +2325,7 @@ void DWARFLinker::DIECloner::generateLineTableForUnit(CompileUnit &Unit) {
if (NewRowIter == OrigRowToNewRow.end()) {
// If the original row index is not found in the map, update the
// stmt_sequence attribute to the 'invalid offset' magic value.
StmtSeq.set(NewOffsetMissing);
StmtSeq.set(UINT64_MAX);
continue;
}

Expand Down
Loading