Skip to content

Commit bbf7b9d

Browse files
committed
[ELF] Remove unused setSymbolAndType after #69295. NFC
One use of setSymbolAndType (related to https://reviews.llvm.org/D53864 "Do not crash when -r output uses linker script with `/DISCARD/`") is no longer needed after commit 1981b1b demotes symbols in discarded sections to Undefined.
1 parent 9aa571f commit bbf7b9d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lld/ELF/InputSection.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,7 @@ void InputSection::copyRelocations(uint8_t *buf,
435435
continue;
436436
}
437437
SectionBase *section = d->section;
438-
if (!section->isLive()) {
439-
p->setSymbolAndType(0, 0, false);
440-
continue;
441-
}
438+
assert(section->isLive());
442439

443440
int64_t addend = rel.addend;
444441
const uint8_t *bufLoc = sec->content().begin() + rel.offset;

0 commit comments

Comments
 (0)