@@ -174,14 +174,16 @@ class LifetimeDependenceInfo {
174
174
borrowLifetimeParamIndices(borrowLifetimeParamIndices),
175
175
mutateLifetimeParamIndices(mutateLifetimeParamIndices) {}
176
176
177
- operator bool () const { return empty (); }
177
+ operator bool () const { return ! empty (); }
178
178
179
179
bool empty () const {
180
180
return inheritLifetimeParamIndices == nullptr &&
181
181
borrowLifetimeParamIndices == nullptr &&
182
182
mutateLifetimeParamIndices == nullptr ;
183
183
}
184
184
std::string getString () const ;
185
+
186
+ void Profile (llvm::FoldingSetNodeID &ID) const ;
185
187
};
186
188
187
189
// MARK: - UnexpectedClangTypeError
@@ -690,20 +692,21 @@ class ASTExtInfoBuilder {
690
692
lifetimeDependenceInfo);
691
693
}
692
694
695
+ void Profile (llvm::FoldingSetNodeID &ID) const {
696
+ ID.AddInteger (bits);
697
+ ID.AddPointer (clangTypeInfo.getType ());
698
+ ID.AddPointer (globalActor.getPointer ());
699
+ ID.AddPointer (thrownError.getPointer ());
700
+ lifetimeDependenceInfo.Profile (ID);
701
+ }
702
+
693
703
bool isEqualTo (ASTExtInfoBuilder other, bool useClangTypes) const {
694
704
return bits == other.bits &&
695
705
(useClangTypes ? (clangTypeInfo == other.clangTypeInfo ) : true ) &&
696
706
globalActor.getPointer () == other.globalActor .getPointer () &&
697
707
thrownError.getPointer () == other.thrownError .getPointer () &&
698
708
lifetimeDependenceInfo == other.lifetimeDependenceInfo ;
699
709
}
700
-
701
- constexpr std::tuple<unsigned , const void *, const void *, const void *>
702
- getFuncAttrKey () const {
703
- return std::make_tuple (
704
- bits, clangTypeInfo.getType (), globalActor.getPointer (),
705
- thrownError.getPointer ());
706
- }
707
710
}; // end ASTExtInfoBuilder
708
711
709
712
// MARK: - ASTExtInfo
@@ -850,14 +853,11 @@ class ASTExtInfo {
850
853
return builder.withLifetimeDependenceInfo (lifetimeDependenceInfo).build ();
851
854
}
852
855
856
+ void Profile (llvm::FoldingSetNodeID &ID) const { builder.Profile (ID); }
857
+
853
858
bool isEqualTo (ASTExtInfo other, bool useClangTypes) const {
854
859
return builder.isEqualTo (other.builder , useClangTypes);
855
860
}
856
-
857
- constexpr std::tuple<unsigned , const void *, const void *, const void *>
858
- getFuncAttrKey () const {
859
- return builder.getFuncAttrKey ();
860
- }
861
861
}; // end ASTExtInfo
862
862
863
863
// MARK: - SILFunctionLanguage
@@ -1122,14 +1122,16 @@ class SILExtInfoBuilder {
1122
1122
return SILExtInfoBuilder (bits, clangTypeInfo, lifetimeDependenceInfo);
1123
1123
}
1124
1124
1125
+ void Profile (llvm::FoldingSetNodeID &ID) const {
1126
+ ID.AddInteger (bits);
1127
+ ID.AddPointer (clangTypeInfo.getType ());
1128
+ lifetimeDependenceInfo.Profile (ID);
1129
+ }
1130
+
1125
1131
bool isEqualTo (SILExtInfoBuilder other, bool useClangTypes) const {
1126
1132
return bits == other.bits &&
1127
1133
(useClangTypes ? (clangTypeInfo == other.clangTypeInfo ) : true );
1128
1134
}
1129
-
1130
- constexpr std::pair<unsigned , const void *> getFuncAttrKey () const {
1131
- return std::make_pair (bits, clangTypeInfo.getType ());
1132
- }
1133
1135
}; // end SILExtInfoBuilder
1134
1136
1135
1137
// MARK: - SILExtInfo
@@ -1243,14 +1245,12 @@ class SILExtInfo {
1243
1245
return builder.withUnimplementable (isUnimplementable).build ();
1244
1246
}
1245
1247
1248
+ void Profile (llvm::FoldingSetNodeID &ID) const { builder.Profile (ID); }
1249
+
1246
1250
bool isEqualTo (SILExtInfo other, bool useClangTypes) const {
1247
1251
return builder.isEqualTo (other.builder , useClangTypes);
1248
1252
}
1249
1253
1250
- constexpr std::pair<unsigned , const void *> getFuncAttrKey () const {
1251
- return builder.getFuncAttrKey ();
1252
- }
1253
-
1254
1254
llvm::Optional<UnexpectedClangTypeError> checkClangType () const ;
1255
1255
};
1256
1256
0 commit comments