@@ -740,12 +740,19 @@ class ASTExtInfoBuilder {
740
740
globalActor, thrownError, lifetimeDependencies);
741
741
}
742
742
743
+ // / \p lifetimeDependencies should be arena allocated and not a temporary
744
+ // / Function types are allocated on the are arena and their ExtInfo should be
745
+ // / valid throughout their lifetime.
743
746
[[nodiscard]] ASTExtInfoBuilder withLifetimeDependencies (
744
747
llvm::ArrayRef<LifetimeDependenceInfo> lifetimeDependencies) const {
745
748
return ASTExtInfoBuilder (bits, clangTypeInfo, globalActor, thrownError,
746
749
lifetimeDependencies);
747
750
}
748
751
752
+ [[nodiscard]] ASTExtInfoBuilder withLifetimeDependencies (
753
+ SmallVectorImpl<LifetimeDependenceInfo> lifetimeDependencies) const =
754
+ delete;
755
+
749
756
[[nodiscard]]
750
757
ASTExtInfoBuilder withIsolation (FunctionTypeIsolation isolation) const {
751
758
return ASTExtInfoBuilder (
@@ -920,11 +927,18 @@ class ASTExtInfo {
920
927
.build ();
921
928
}
922
929
930
+ // / \p lifetimeDependencies should be arena allocated and not a temporary
931
+ // / Function types are allocated on the are arena and their ExtInfo should be
932
+ // / valid throughout their lifetime.
923
933
[[nodiscard]] ASTExtInfo withLifetimeDependencies (
924
934
ArrayRef<LifetimeDependenceInfo> lifetimeDependencies) const {
925
935
return builder.withLifetimeDependencies (lifetimeDependencies).build ();
926
936
}
927
937
938
+ [[nodiscard]] ASTExtInfo withLifetimeDependencies (
939
+ SmallVectorImpl<LifetimeDependenceInfo> lifetimeDependencies) const =
940
+ delete;
941
+
928
942
void Profile (llvm::FoldingSetNodeID &ID) const { builder.Profile (ID); }
929
943
930
944
bool isEqualTo (ASTExtInfo other, bool useClangTypes) const {
@@ -1227,11 +1241,19 @@ class SILExtInfoBuilder {
1227
1241
return SILExtInfoBuilder (bits, ClangTypeInfo (type).getCanonical (),
1228
1242
lifetimeDependencies);
1229
1243
}
1244
+
1245
+ // / \p lifetimeDependencies should be arena allocated and not a temporary
1246
+ // / Function types are allocated on the are arena and their ExtInfo should be
1247
+ // / valid throughout their lifetime.
1230
1248
[[nodiscard]] SILExtInfoBuilder withLifetimeDependencies (
1231
1249
ArrayRef<LifetimeDependenceInfo> lifetimeDependenceInfo) const {
1232
1250
return SILExtInfoBuilder (bits, clangTypeInfo, lifetimeDependenceInfo);
1233
1251
}
1234
1252
1253
+ [[nodiscard]] ASTExtInfoBuilder withLifetimeDependencies (
1254
+ SmallVectorImpl<LifetimeDependenceInfo> lifetimeDependencies) const =
1255
+ delete;
1256
+
1235
1257
void Profile (llvm::FoldingSetNodeID &ID) const {
1236
1258
ID.AddInteger (bits);
1237
1259
ID.AddPointer (clangTypeInfo.getType ());
@@ -1368,11 +1390,17 @@ class SILExtInfo {
1368
1390
return builder.withUnimplementable (isUnimplementable).build ();
1369
1391
}
1370
1392
1393
+ // / \p lifetimeDependencies should be arena allocated and not a temporary
1394
+ // / Function types are allocated on the are arena and their ExtInfo should be
1395
+ // / valid throughout their lifetime.
1371
1396
SILExtInfo withLifetimeDependencies (
1372
1397
ArrayRef<LifetimeDependenceInfo> lifetimeDependencies) const {
1373
1398
return builder.withLifetimeDependencies (lifetimeDependencies);
1374
1399
}
1375
1400
1401
+ SILExtInfo withLifetimeDependencies (SmallVectorImpl<LifetimeDependenceInfo>
1402
+ lifetimeDependencies) const = delete;
1403
+
1376
1404
void Profile (llvm::FoldingSetNodeID &ID) const { builder.Profile (ID); }
1377
1405
1378
1406
bool isEqualTo (SILExtInfo other, bool useClangTypes) const {
0 commit comments