@@ -1370,32 +1370,18 @@ getSILFunctionTypeForSelectorFamily(SILModule &M, SelectorFamily family,
1370
1370
1371
1371
static CanSILFunctionType
1372
1372
getUncachedSILFunctionTypeForConstant (SILModule &M, SILDeclRef constant,
1373
- CanAnyFunctionType origLoweredType,
1374
- CanAnyFunctionType origLoweredInterfaceType,
1375
- CanAnyFunctionType substFormalType,
1376
- CanAnyFunctionType substInterfaceType) {
1377
- assert (origLoweredType->getExtInfo ().getSILRepresentation ()
1373
+ CanAnyFunctionType origLoweredInterfaceType) {
1374
+ assert (origLoweredInterfaceType->getExtInfo ().getSILRepresentation ()
1378
1375
!= SILFunctionTypeRepresentation::Thick
1379
- && origLoweredType ->getExtInfo ().getSILRepresentation ()
1376
+ && origLoweredInterfaceType ->getExtInfo ().getSILRepresentation ()
1380
1377
!= SILFunctionTypeRepresentation::Block);
1381
1378
1382
- auto extInfo = origLoweredType->getExtInfo ();
1383
-
1384
- CanAnyFunctionType substLoweredInterfaceType;
1385
- if (substInterfaceType) {
1386
- substLoweredInterfaceType
1387
- = M.Types .getLoweredASTFunctionType (substInterfaceType,
1388
- constant.uncurryLevel ,
1389
- extInfo,
1390
- constant);
1391
- } else {
1392
- substLoweredInterfaceType = origLoweredInterfaceType;
1393
- }
1379
+ auto extInfo = origLoweredInterfaceType->getExtInfo ();
1394
1380
1395
1381
if (!constant.isForeign ) {
1396
1382
return getNativeSILFunctionType (M,
1397
1383
AbstractionPattern (origLoweredInterfaceType),
1398
- substLoweredInterfaceType ,
1384
+ origLoweredInterfaceType ,
1399
1385
extInfo,
1400
1386
constant,
1401
1387
constant.kind );
@@ -1413,16 +1399,16 @@ getUncachedSILFunctionTypeForConstant(SILModule &M, SILDeclRef constant,
1413
1399
1414
1400
if (auto clangDecl = findClangMethod (decl))
1415
1401
return getSILFunctionTypeForClangDecl (M, clangDecl,
1416
- origLoweredType ,
1417
- substLoweredInterfaceType ,
1402
+ origLoweredInterfaceType ,
1403
+ origLoweredInterfaceType ,
1418
1404
extInfo, foreignError);
1419
1405
}
1420
1406
1421
1407
// If the decl belongs to an ObjC method family, use that family's
1422
1408
// ownership conventions.
1423
1409
return getSILFunctionTypeForSelectorFamily (M, getSelectorFamily (constant),
1424
- origLoweredType ,
1425
- substLoweredInterfaceType ,
1410
+ origLoweredInterfaceType ,
1411
+ origLoweredInterfaceType ,
1426
1412
extInfo, foreignError);
1427
1413
}
1428
1414
@@ -1511,10 +1497,8 @@ SILConstantInfo TypeConverter::getConstantInfo(SILDeclRef constant) {
1511
1497
1512
1498
// The SIL type encodes conventions according to the original type.
1513
1499
CanSILFunctionType silFnType =
1514
- getUncachedSILFunctionTypeForConstant (M, constant, loweredType,
1515
- loweredInterfaceType,
1516
- CanAnyFunctionType (),
1517
- CanAnyFunctionType ());
1500
+ getUncachedSILFunctionTypeForConstant (M, constant,
1501
+ loweredInterfaceType);
1518
1502
1519
1503
DEBUG (llvm::dbgs () << " lowering type for constant " ;
1520
1504
constant.print (llvm::dbgs ());
0 commit comments