[MachO] Fix struct size assertion

It was checking for 64-bit builds incorrectly. Unfortunately,
ConcatInputSection has grown a bit in the meantime, and I don't see any
obvious way to shrink it. Perhaps icfEqClass could use 32-bit hashes
instead of 64-bit ones, but xxHash64 is supposed to be much faster than
xxHash32 (https://github.com/Cyan4973/xxHash#benchmarks), so that sounds
like a loss. (Unrelatedly, we should really look at using XXH3 instead
of xxHash64 now.)

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D113809
This commit is contained in:
Shoaib Meenai 2021-11-12 15:10:59 -08:00
parent b715b79d54
commit 637a3396b3
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ public:
};
// Verify ConcatInputSection's size on 64-bit builds.
static_assert(sizeof(int) != 8 || sizeof(ConcatInputSection) == 112,
static_assert(sizeof(void *) != 8 || sizeof(ConcatInputSection) == 120,
"Try to minimize ConcatInputSection's size, we create many "
"instances of it");