-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[32bits] Update assert on SymbolicValue size #27515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Since the storage is a multiple of uint64_t (derived by what LLVM's APInt does) we want to check for 2*uin64_t here, even on 32bit platforms.
@@ -556,7 +556,7 @@ class SymbolicValue { | |||
void dump() const; | |||
}; | |||
|
|||
static_assert(sizeof(SymbolicValue) == 2 * sizeof(void *), | |||
static_assert(sizeof(SymbolicValue) == 2 * sizeof(uint64_t), | |||
"SymbolicValue should stay small"); | |||
static_assert(std::is_pod<SymbolicValue>::value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcrasi While here, I suggest changing this to is_trivially_copyable
or is_trivial
or is_standard_layout
, whichever is actually being relied upon. See https://en.cppreference.com/w/cpp/named_req/PODType for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a PR: #27521
@swift-ci Please smoke test and merge |
Same
|
swiftlang/swift-corelibs-foundation#2532 |
@swift-ci Please smoke test Linux |
1 similar comment
@swift-ci Please smoke test Linux |
Sorry for the delay! |
No problem 👍 |
Since the storage is a multiple of uint64_t (following what LLVM's APInt does, copy implemented here) we want to check for 2*uin64_t here, even on 32bit platforms.
Right now, this breaks 5.1 builds on 32bits(arm&co).