summaryrefslogtreecommitdiff
path: root/lld/MachO/InputSection.cpp
diff options
context:
space:
mode:
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");