We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfda992 commit 01a5351Copy full SHA for 01a5351
lib/IRGen/GenFunc.cpp
@@ -1435,11 +1435,8 @@ void irgen::emitFunctionPartialApplication(
1435
if (isIndirectFormalParameter(*singleRefcountedConvention))
1436
ctx = IGF.Builder.CreateLoad(ctx, IGF.IGM.getPointerAlignment());
1437
// We might get a struct containing a pointer e.g type <{ %AClass* }>
1438
- if (!ctx->getType()->isPointerTy())
1439
- ctx = IGF.coerceValue(ctx, IGF.IGM.RefCountedPtrTy,
1440
- IGF.IGM.DataLayout);
1441
- else
1442
- ctx = IGF.Builder.CreateBitCast(ctx, IGF.IGM.RefCountedPtrTy);
+ if (ctx->getType() != IGF.IGM.RefCountedPtrTy)
+ ctx = IGF.coerceValue(ctx, IGF.IGM.RefCountedPtrTy, IGF.IGM.DataLayout);
1443
out.add(ctx);
1444
return;
1445
}
0 commit comments