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
IRGen: Fix type of a global with tail allocated storage #19397
Conversation
Cast the result to the expected type rather than a special '..._tailelemsN' type. rdar://44563038
@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(); |
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.
Maybe I missed something in the logic here. But why did you introduce a new variable 'castStorageToType' and not just assign 'storageType' here?
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.
It is used to create the global variable.
Here:
https://github.com/apple/swift/pull/19397/files#diff-62e4305d226cedd49d95b3dff4f8b7b8R1831
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.
Ah, I see
@swift-ci Please test |
Build failed |
@swift-ci Please test and merge |
@swift-ci Please test |
Build failed |
Build failed |
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.
lgtm
Test failure unrelated. |
@swift-ci Please test mac os |
@swift-ci Please test macos |
Cast the result to the expected type rather than a special
'..._tailelemsN' type.
rdar://44563038