aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp')
-rw-r--r--llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp b/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
index 222dc88..559d808 100644
--- a/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
+++ b/llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
@@ -43,6 +43,12 @@ 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;
@@ -2315,7 +2321,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(UINT64_MAX);
+ StmtSeq.set(OrigOffsetMissing);
continue;
}
size_t OrigRowIndex = OrigRowIter->second;
@@ -2325,7 +2331,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(UINT64_MAX);
+ StmtSeq.set(NewOffsetMissing);
continue;
}