@@ -1346,7 +1346,7 @@ void irgen::emitFunctionPartialApplication(
1346
1346
SmallVector<SILType, 4 > argValTypes;
1347
1347
SmallVector<ParameterConvention, 4 > argConventions;
1348
1348
1349
- bool isNoEscapeFunction = outType->isNoEscape ();
1349
+ assert (! outType->isNoEscape () );
1350
1350
1351
1351
// Reserve space for polymorphic bindings.
1352
1352
SubstitutionMap subMap;
@@ -1476,10 +1476,7 @@ void irgen::emitFunctionPartialApplication(
1476
1476
fnPtr = IGF.Builder .CreateBitCast (fnPtr, IGF.IGM .Int8PtrTy );
1477
1477
out.add (fnPtr);
1478
1478
llvm::Value *ctx = args.claimNext ();
1479
- if (isNoEscapeFunction)
1480
- ctx = IGF.Builder .CreateBitCast (ctx, IGF.IGM .OpaquePtrTy );
1481
- else
1482
- ctx = IGF.Builder .CreateBitCast (ctx, IGF.IGM .RefCountedPtrTy );
1479
+ ctx = IGF.Builder .CreateBitCast (ctx, IGF.IGM .RefCountedPtrTy );
1483
1480
out.add (ctx);
1484
1481
return ;
1485
1482
}
@@ -1520,10 +1517,7 @@ void irgen::emitFunctionPartialApplication(
1520
1517
llvm::Value *ctx = args.claimNext ();
1521
1518
if (isIndirectFormalParameter (*singleRefcountedConvention))
1522
1519
ctx = IGF.Builder .CreateLoad (ctx, IGF.IGM .getPointerAlignment ());
1523
- if (isNoEscapeFunction)
1524
- ctx = IGF.Builder .CreateBitCast (ctx, IGF.IGM .OpaquePtrTy );
1525
- else
1526
- ctx = IGF.Builder .CreateBitCast (ctx, IGF.IGM .RefCountedPtrTy );
1520
+ ctx = IGF.Builder .CreateBitCast (ctx, IGF.IGM .RefCountedPtrTy );
1527
1521
out.add (ctx);
1528
1522
return ;
1529
1523
}
@@ -1614,8 +1608,6 @@ void irgen::emitFunctionPartialApplication(
1614
1608
argConventions);
1615
1609
forwarder = IGF.Builder .CreateBitCast (forwarder, IGF.IGM .Int8PtrTy );
1616
1610
out.add (forwarder);
1617
- if (isNoEscapeFunction)
1618
- data = IGF.Builder .CreateBitCast (data, IGF.IGM .OpaquePtrTy );
1619
1611
out.add (data);
1620
1612
}
1621
1613
0 commit comments