mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-25 02:28:18 +00:00
[ELF] Assert sizeof(SymbolUnion) <= 80
Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D64077 llvm-svn: 365443
This commit is contained in:
parent
c117be6fc6
commit
50e7f45b28
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user