Skip to content

Correction for 32 bits platforms #6845

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

Merged
merged 1 commit into from
Jan 30, 2017
Merged

Correction for 32 bits platforms #6845

merged 1 commit into from
Jan 30, 2017

Conversation

jmgc
Copy link
Contributor

@jmgc jmgc commented Jan 16, 2017

Pull base on the changes requested in pull #6838.

@hughbe
Copy link
Contributor

hughbe commented Jan 16, 2017

Might be work making the commit description better (e.g. "Fix sizeof assertion on 32 bit platforms"):

git commit --amend
git push -f

static_assert(sizeof(EffectiveClangContext) <= 2 * sizeof(void *),
"should fit in a couple pointers");
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can do something more generic considering that LLVM_PTR_SIZE is equal to sizeof(void *) and we know that EffectiveClangContext should be less than or equal to 16 bytes long. Otherwise, LGTM. Nice catch!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we shouldn't even bother. @milseman?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Originally I think the whole thing fit in one pointer, even on 32-bit platforms. Going from one to two is a bigger jump than two to four.)

@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

@jrose-apple jrose-apple requested a review from milseman January 23, 2017 17:36
@slavapestov slavapestov merged commit 47e0079 into swiftlang:master Jan 30, 2017
@jrose-apple
Copy link
Contributor

Slava, please don't merge PRs with open review requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants