diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -483,11 +483,6 @@ alignas(LazyObject) char e[sizeof(LazyObject)]; }; -// It is important to keep the size of SymbolUnion small for performance and -// memory usage reasons. 64 bytes is a soft limit based on the size of Defined -// on a 64-bit system. -static_assert(sizeof(SymbolUnion) <= 64, "SymbolUnion too large"); - template struct AssertSymbol { static_assert(std::is_trivially_destructible(), "Symbol types must be trivially destructible"); diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -24,6 +24,11 @@ using namespace lld; using namespace lld::elf; +// It is important to keep the size of SymbolUnion small for performance and +// memory usage reasons. 64 bytes is a soft limit based on the size of Defined +// on a 64-bit system. +static_assert(sizeof(SymbolUnion) <= 64, "SymbolUnion too large"); + std::string lld::toString(const elf::Symbol &sym) { StringRef name = sym.getName(); std::string ret = demangle(name, config->demangle);