mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 20:29:30 +00:00
DwarfAccelTable: remove unneeded bucket terminators.
Last commit fixed the handling of hash collisions, but it introdcuced unneeded bucket terminators in some places. The generated table was correct, it can just be a tiny bit smaller. As the previous table was correct, the test doesn't need updating. If we really wanted to test this, I could add the section size to the dwarf dump and test for a precise value there. IMO the correctness test is sufficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231748 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9e894a9129
commit
d8b587de3b
@ -205,8 +205,8 @@ void DwarfAccelTable::EmitOffsets(AsmPrinter *Asm, MCSymbol *SecBegin) {
|
|||||||
// Terminate each HashData bucket with 0.
|
// Terminate each HashData bucket with 0.
|
||||||
void DwarfAccelTable::EmitData(AsmPrinter *Asm, DwarfDebug *D,
|
void DwarfAccelTable::EmitData(AsmPrinter *Asm, DwarfDebug *D,
|
||||||
MCSymbol *StrSym) {
|
MCSymbol *StrSym) {
|
||||||
uint64_t PrevHash = UINT64_MAX;
|
|
||||||
for (size_t i = 0, e = Buckets.size(); i < e; ++i) {
|
for (size_t i = 0, e = Buckets.size(); i < e; ++i) {
|
||||||
|
uint64_t PrevHash = UINT64_MAX;
|
||||||
for (HashList::const_iterator HI = Buckets[i].begin(),
|
for (HashList::const_iterator HI = Buckets[i].begin(),
|
||||||
HE = Buckets[i].end();
|
HE = Buckets[i].end();
|
||||||
HI != HE; ++HI) {
|
HI != HE; ++HI) {
|
||||||
@ -235,7 +235,8 @@ void DwarfAccelTable::EmitData(AsmPrinter *Asm, DwarfDebug *D,
|
|||||||
PrevHash = (*HI)->HashValue;
|
PrevHash = (*HI)->HashValue;
|
||||||
}
|
}
|
||||||
// Emit the final end marker for the bucket.
|
// Emit the final end marker for the bucket.
|
||||||
Asm->EmitInt32(0);
|
if (!Buckets[i].empty())
|
||||||
|
Asm->EmitInt32(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user