summaryrefslogtreecommitdiff
path: root/lld/MachO/InputSection.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-12-02 21:02:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-12-02 21:02:54 +0000
commitf65dcba83ce5035ab88a85fe17628b447eb56e1b (patch)
tree35f37bb72b3cfc6060193e66c76ee7c9478969b0 /lld/MachO/InputSection.cpp
parent846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb (diff)
Vendor import of llvm-project main llvmorg-14-init-11187-g222442ec2d71.vendor/llvm-project/llvmorg-14-init-11187-g222442ec2d71
Diffstat (limited to 'lld/MachO/InputSection.cpp')
-rw-r--r--lld/MachO/InputSection.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lld/MachO/InputSection.cpp b/lld/MachO/InputSection.cpp
index 96167b72a724..d42085737dbb 100644
--- a/lld/MachO/InputSection.cpp
+++ b/lld/MachO/InputSection.cpp
@@ -26,8 +26,11 @@ using namespace llvm::support;
using namespace lld;
using namespace lld::macho;
-// Verify ConcatInputSection's size on 64-bit builds.
-static_assert(sizeof(void *) != 8 || sizeof(ConcatInputSection) == 120,
+// Verify ConcatInputSection's size on 64-bit builds. The size of std::vector
+// can differ based on STL debug levels (e.g. iterator debugging on MSVC's STL),
+// so account for that.
+static_assert(sizeof(void *) != 8 ||
+ sizeof(ConcatInputSection) == sizeof(std::vector<Reloc>) + 96,
"Try to minimize ConcatInputSection's size, we create many "
"instances of it");