Skip to content

Commit 805bb64

Browse files
author
Alex B
committed
mend
1 parent 72d3761 commit 805bb64

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

llvm/include/llvm/MC/MCDwarf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ class MCDwarfLineEntry : public MCDwarfLoc {
216216

217217
// Override the label with the given EndLabel.
218218
void setEndLabel(MCSymbol *EndLabel) {
219+
// If we're setting this to be an end entry, make sure we don't have
220+
// LineStreamLabel set.
221+
assert(LineStreamLabel == nullptr);
219222
Label = EndLabel;
220223
IsEndEntry = true;
221224
}

llvm/lib/MC/MCDwarf.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,13 @@ void MCLineSection::addEndEntry(MCSymbol *EndLabel) {
163163

164164
// Create the end entry based on the last existing entry.
165165
MCDwarfLineEntry EndEntry = Entries.back();
166-
EndEntry.setEndLabel(EndLabel);
166+
167167
// An end entry is just for marking the end of a sequence of code locations.
168168
// It should not carry forward a LineStreamLabel from a previous special entry
169169
// if Entries.back() happened to be such an entry. So here we clear
170170
// LineStreamLabel.
171171
EndEntry.LineStreamLabel = nullptr;
172+
EndEntry.setEndLabel(EndLabel);
172173
Entries.push_back(EndEntry);
173174
}
174175

0 commit comments

Comments
 (0)