Skip to content

Commit 637a339

Browse files
committed
[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
1 parent b715b79 commit 637a339

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/MachO/InputSection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class ConcatInputSection final : public InputSection {
150150
};
151151

152152
// Verify ConcatInputSection's size on 64-bit builds.
153-
static_assert(sizeof(int) != 8 || sizeof(ConcatInputSection) == 112,
153+
static_assert(sizeof(void *) != 8 || sizeof(ConcatInputSection) == 120,
154154
"Try to minimize ConcatInputSection's size, we create many "
155155
"instances of it");
156156

0 commit comments

Comments
 (0)