@@ -740,12 +740,19 @@ class ASTExtInfoBuilder {
740740 globalActor, thrownError, lifetimeDependencies);
741741 }
742742
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.
743746 [[nodiscard]] ASTExtInfoBuilder withLifetimeDependencies (
744747 llvm::ArrayRef<LifetimeDependenceInfo> lifetimeDependencies) const {
745748 return ASTExtInfoBuilder (bits, clangTypeInfo, globalActor, thrownError,
746749 lifetimeDependencies);
747750 }
748751
752+ [[nodiscard]] ASTExtInfoBuilder withLifetimeDependencies (
753+ SmallVectorImpl<LifetimeDependenceInfo> lifetimeDependencies) const =
754+ delete;
755+
749756 [[nodiscard]]
750757 ASTExtInfoBuilder withIsolation (FunctionTypeIsolation isolation) const {
751758 return ASTExtInfoBuilder (
@@ -920,11 +927,18 @@ class ASTExtInfo {
920927 .build ();
921928 }
922929
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.
923933 [[nodiscard]] ASTExtInfo withLifetimeDependencies (
924934 ArrayRef<LifetimeDependenceInfo> lifetimeDependencies) const {
925935 return builder.withLifetimeDependencies (lifetimeDependencies).build ();
926936 }
927937
938+ [[nodiscard]] ASTExtInfo withLifetimeDependencies (
939+ SmallVectorImpl<LifetimeDependenceInfo> lifetimeDependencies) const =
940+ delete;
941+
928942 void Profile (llvm::FoldingSetNodeID &ID) const { builder.Profile (ID); }
929943
930944 bool isEqualTo (ASTExtInfo other, bool useClangTypes) const {
@@ -1227,11 +1241,19 @@ class SILExtInfoBuilder {
12271241 return SILExtInfoBuilder (bits, ClangTypeInfo (type).getCanonical (),
12281242 lifetimeDependencies);
12291243 }
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.
12301248 [[nodiscard]] SILExtInfoBuilder withLifetimeDependencies (
12311249 ArrayRef<LifetimeDependenceInfo> lifetimeDependenceInfo) const {
12321250 return SILExtInfoBuilder (bits, clangTypeInfo, lifetimeDependenceInfo);
12331251 }
12341252
1253+ [[nodiscard]] ASTExtInfoBuilder withLifetimeDependencies (
1254+ SmallVectorImpl<LifetimeDependenceInfo> lifetimeDependencies) const =
1255+ delete;
1256+
12351257 void Profile (llvm::FoldingSetNodeID &ID) const {
12361258 ID.AddInteger (bits);
12371259 ID.AddPointer (clangTypeInfo.getType ());
@@ -1368,11 +1390,17 @@ class SILExtInfo {
13681390 return builder.withUnimplementable (isUnimplementable).build ();
13691391 }
13701392
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.
13711396 SILExtInfo withLifetimeDependencies (
13721397 ArrayRef<LifetimeDependenceInfo> lifetimeDependencies) const {
13731398 return builder.withLifetimeDependencies (lifetimeDependencies);
13741399 }
13751400
1401+ SILExtInfo withLifetimeDependencies (SmallVectorImpl<LifetimeDependenceInfo>
1402+ lifetimeDependencies) const = delete;
1403+
13761404 void Profile (llvm::FoldingSetNodeID &ID) const { builder.Profile (ID); }
13771405
13781406 bool isEqualTo (SILExtInfo other, bool useClangTypes) const {
0 commit comments