Skip to content

Conversation

aschwaighofer
Copy link
Contributor

…erence using an indirect convention

A <{ %AClass*}> value cannot be bitcasted to a swift.refcounted*.

rdar://46538967

…erence using an indirect convention

A <{ %AClass*}> value cannot be bitcasted to a swift.refcounted*.

rdar://46538967
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test and merge

ctx = IGF.Builder.CreateBitCast(ctx, IGF.IGM.RefCountedPtrTy);
// We might get a struct containing a pointer e.g type <{ %AClass* }>
if (!ctx->getType()->isPointerTy())
ctx = IGF.coerceValue(ctx, IGF.IGM.RefCountedPtrTy,
Copy link
Contributor

Choose a reason for hiding this comment

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

does coerceValue() not handle the bitcast case as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it does: #21207

@swift-ci swift-ci merged commit 101e9ec into swiftlang:master Dec 11, 2018
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.

3 participants