@@ -935,8 +935,7 @@ class SILExtInfoBuilder {
935935 DifferentiabilityMask = 0x7 << DifferentiabilityMaskOffset,
936936 UnimplementableMask = 1 << 12 ,
937937 ErasedIsolationMask = 1 << 13 ,
938- TransferringResultMask = 1 << 14 ,
939- NumMaskBits = 15
938+ NumMaskBits = 14
940939 };
941940
942941 unsigned bits; // Naturally sized for speed.
@@ -957,17 +956,15 @@ class SILExtInfoBuilder {
957956 bool isNoEscape, bool isSendable,
958957 bool isAsync, bool isUnimplementable,
959958 SILFunctionTypeIsolation isolation,
960- bool hasTransferringResult,
961959 DifferentiabilityKind diffKind) {
962960 return ((unsigned )rep) | (isPseudogeneric ? PseudogenericMask : 0 ) |
963961 (isNoEscape ? NoEscapeMask : 0 ) | (isSendable ? SendableMask : 0 ) |
964962 (isAsync ? AsyncMask : 0 ) |
965963 (isUnimplementable ? UnimplementableMask : 0 ) |
966- (isolation == SILFunctionTypeIsolation::Erased
967- ? ErasedIsolationMask : 0 ) |
964+ (isolation == SILFunctionTypeIsolation::Erased ? ErasedIsolationMask
965+ : 0 ) |
968966 (((unsigned )diffKind << DifferentiabilityMaskOffset) &
969- DifferentiabilityMask) |
970- (hasTransferringResult ? TransferringResultMask : 0 );
967+ DifferentiabilityMask);
971968 }
972969
973970public:
@@ -976,19 +973,18 @@ class SILExtInfoBuilder {
976973 SILExtInfoBuilder ()
977974 : SILExtInfoBuilder(makeBits(SILFunctionTypeRepresentation::Thick, false ,
978975 false , false , false , false ,
979- SILFunctionTypeIsolation::Unknown, false ,
976+ SILFunctionTypeIsolation::Unknown,
980977 DifferentiabilityKind::NonDifferentiable),
981978 ClangTypeInfo(nullptr ), LifetimeDependenceInfo()) {}
982979
983980 SILExtInfoBuilder (Representation rep, bool isPseudogeneric, bool isNoEscape,
984981 bool isSendable, bool isAsync, bool isUnimplementable,
985982 SILFunctionTypeIsolation isolation,
986983 DifferentiabilityKind diffKind, const clang::Type *type,
987- LifetimeDependenceInfo lifetimeDependenceInfo,
988- bool hasTransferringResult)
984+ LifetimeDependenceInfo lifetimeDependenceInfo)
989985 : SILExtInfoBuilder(makeBits(rep, isPseudogeneric, isNoEscape, isSendable,
990986 isAsync, isUnimplementable, isolation,
991- hasTransferringResult, diffKind),
987+ diffKind),
992988 ClangTypeInfo(type), lifetimeDependenceInfo) {}
993989
994990 // Constructor for polymorphic type.
@@ -999,7 +995,6 @@ class SILExtInfoBuilder {
999995 info.getIsolation().isErased()
1000996 ? SILFunctionTypeIsolation::Erased
1001997 : SILFunctionTypeIsolation::Unknown,
1002- /* has transferring result*/ false,
1003998 info.getDifferentiabilityKind()),
1004999 info.getClangTypeInfo(),
10051000 info.getLifetimeDependenceInfo()) {}
@@ -1029,10 +1024,6 @@ class SILExtInfoBuilder {
10291024
10301025 constexpr bool isAsync () const { return bits & AsyncMask; }
10311026
1032- constexpr bool hasTransferringResult () const {
1033- return bits & TransferringResultMask;
1034- }
1035-
10361027 constexpr DifferentiabilityKind getDifferentiabilityKind () const {
10371028 return DifferentiabilityKind ((bits & DifferentiabilityMask) >>
10381029 DifferentiabilityMaskOffset);
@@ -1166,14 +1157,6 @@ class SILExtInfoBuilder {
11661157 clangTypeInfo, lifetimeDependenceInfo);
11671158 }
11681159
1169- [[nodiscard]] SILExtInfoBuilder
1170- withTransferringResult (bool hasTransferringResult = true ) const {
1171- return SILExtInfoBuilder (hasTransferringResult
1172- ? (bits | TransferringResultMask)
1173- : (bits & ~TransferringResultMask),
1174- clangTypeInfo, lifetimeDependenceInfo);
1175- }
1176-
11771160 [[nodiscard]]
11781161 SILExtInfoBuilder
11791162 withDifferentiabilityKind (DifferentiabilityKind differentiability) const {
@@ -1239,11 +1222,11 @@ class SILExtInfo {
12391222
12401223 // / A default ExtInfo but with a Thin convention.
12411224 static SILExtInfo getThin () {
1242- return SILExtInfoBuilder (
1243- SILExtInfoBuilder::Representation::Thin , false , false , false ,
1244- false , false , SILFunctionTypeIsolation::Unknown,
1245- DifferentiabilityKind::NonDifferentiable, nullptr ,
1246- LifetimeDependenceInfo (), false /* transferring result */ )
1225+ return SILExtInfoBuilder (SILExtInfoBuilder::Representation::Thin, false ,
1226+ false , false , false , false ,
1227+ SILFunctionTypeIsolation::Unknown,
1228+ DifferentiabilityKind::NonDifferentiable, nullptr ,
1229+ LifetimeDependenceInfo () )
12471230 .build ();
12481231 }
12491232
@@ -1281,10 +1264,6 @@ class SILExtInfo {
12811264 return builder.getIsolation ();
12821265 }
12831266
1284- constexpr bool hasTransferringResult () const {
1285- return builder.hasTransferringResult ();
1286- }
1287-
12881267 constexpr DifferentiabilityKind getDifferentiabilityKind () const {
12891268 return builder.getDifferentiabilityKind ();
12901269 }
@@ -1331,10 +1310,6 @@ class SILExtInfo {
13311310 return builder.withUnimplementable (isUnimplementable).build ();
13321311 }
13331312
1334- SILExtInfo withTransferringResult (bool hasTransferringResult = true ) const {
1335- return builder.withTransferringResult (hasTransferringResult).build ();
1336- }
1337-
13381313 SILExtInfo withLifetimeDependenceInfo (LifetimeDependenceInfo info) const {
13391314 return builder.withLifetimeDependenceInfo (info);
13401315 }
0 commit comments