diff options
-rw-r--r-- | lld/ELF/Symbols.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 6ca24d4413a..f9b1fc6c4dc 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -460,6 +460,11 @@ union SymbolUnion { alignas(LazyObject) char F[sizeof(LazyObject)]; }; +// It is important to keep the size of SymbolUnion small for performance and +// memory usage reasons. 80 bytes is a soft limit based on the size of Defined +// on a 64-bit system. +static_assert(sizeof(SymbolUnion) <= 80, "SymbolUnion too large"); + template <typename T> struct AssertSymbol { static_assert(std::is_trivially_destructible<T>(), "Symbol types must be trivially destructible"); |