Skip to content

Conversation

@augusto2112
Copy link

If TypeSystemSwiftTypeRef::GetByteStride fails, we should fallback to SwiftASTContext, much like the other functions in the typeref typesystem.

rdar://105124851

If TypeSystemSwiftTypeRef::GetByteStride fails, we should fallback to
SwiftASTContext, much like the other functions in the typeref
typesystem.

rdar://105124851
@augusto2112
Copy link
Author

@swift-ci test

Copy link

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

Hmm.. I guess the runtime data could be corrupt or missing and then this would be of advatage. Is there a specific test case that motivates this?

@augusto2112
Copy link
Author

@adrian-prantl for some reason we can't find type information for CFGloats using the runtime. I think we should investigate that separately as well, but we should fallback to swift ast context here, to mirror how other functions in TypeSystemSwiftTyperef behave when the runtime fails for whatever reason.

@adrian-prantl
Copy link

CGFloat is both a special-cased type in ClangImporter, and it may also have been moved between frameworks in the past...

@adrian-prantl
Copy link

Might be worth adding a test for that type regardless

@augusto2112 augusto2112 changed the base branch from stable/20221013 to swift/release/5.9 May 19, 2023 22:34
@augusto2112
Copy link
Author

@swift-ci test

@augusto2112
Copy link
Author

@swift-ci test windows

@augusto2112 augusto2112 requested a review from adrian-prantl May 20, 2023 02:06
@augusto2112
Copy link
Author

@adrian-prantl could you merge this? The underlying CGFloat issue is solved by #6886 but we should add this fallback to GetByteStride anyway

@adrian-prantl adrian-prantl merged commit cee9300 into swiftlang:swift/release/5.9 May 22, 2023
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.

2 participants