Skip to content

Commit 4b7c10a

Browse files
committed
[lld][ELF] Delete useless assertions
Assertions in the member functions below are considered not useful. See llvm#96169 (comment) - `GotSection::addEntry` - `GotSection::addTlsDescEntry` - `GotSection::addDynTlsEntry`
1 parent 12d6832 commit 4b7c10a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lld/ELF/SyntheticSections.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,19 +653,16 @@ GotSection::GotSection()
653653

654654
void GotSection::addConstant(const Relocation &r) { relocations.push_back(r); }
655655
void GotSection::addEntry(const Symbol &sym) {
656-
assert(sym.auxIdx == symAux.size() - 1);
657656
symAux.back().gotIdx = numEntries++;
658657
}
659658

660659
bool GotSection::addTlsDescEntry(const Symbol &sym) {
661-
assert(sym.auxIdx == symAux.size() - 1);
662660
symAux.back().tlsDescIdx = numEntries;
663661
numEntries += 2;
664662
return true;
665663
}
666664

667665
bool GotSection::addDynTlsEntry(const Symbol &sym) {
668-
assert(sym.auxIdx == symAux.size() - 1);
669666
symAux.back().tlsGdIdx = numEntries;
670667
// Global Dynamic TLS entries take two GOT slots.
671668
numEntries += 2;

0 commit comments

Comments
 (0)