Skip to content
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

IRGen: Fix type of a global with tail allocated storage #19397

Merged
merged 2 commits into from Sep 21, 2018

Conversation

aschwaighofer
Copy link
Member

Cast the result to the expected type rather than a special
'..._tailelemsN' type.

rdar://44563038

Cast the result to the expected type rather than a special
'..._tailelemsN' type.

rdar://44563038
@aschwaighofer
Copy link
Member Author

@swift-ci Please test and merge

@@ -1768,6 +1769,7 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
storageType = Layout->getType();
fixedSize = Layout->getSize();
fixedAlignment = Layout->getAlignment();
castStorageToType = cast<FixedTypeInfo>(ti).getStorageType();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe I missed something in the logic here. But why did you introduce a new variable 'castStorageToType' and not just assign 'storageType' here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see

@aschwaighofer
Copy link
Member Author

@swift-ci Please test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 8ccc517

@aschwaighofer
Copy link
Member Author

@swift-ci Please test and merge

@aschwaighofer
Copy link
Member Author

@swift-ci Please test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - 8ccc517

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 8ccc517

Copy link
Member

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm

@aschwaighofer
Copy link
Member Author

Test failure unrelated.

@aschwaighofer
Copy link
Member Author

@swift-ci Please test mac os

@aschwaighofer
Copy link
Member Author

@swift-ci Please test macos

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.

None yet

3 participants