@@ -966,6 +966,7 @@ class SolutionApplicationTargetsKey {
966
966
stmtCondElement,
967
967
expr,
968
968
stmt,
969
+ pattern,
969
970
patternBindingEntry,
970
971
varDecl,
971
972
};
@@ -980,6 +981,8 @@ class SolutionApplicationTargetsKey {
980
981
981
982
const Stmt *stmt;
982
983
984
+ const Pattern *pattern;
985
+
983
986
struct PatternBindingEntry {
984
987
const PatternBindingDecl *patternBinding;
985
988
unsigned index;
@@ -1009,6 +1012,11 @@ class SolutionApplicationTargetsKey {
1009
1012
storage.stmt = stmt;
1010
1013
}
1011
1014
1015
+ SolutionApplicationTargetsKey (const Pattern *pattern) {
1016
+ kind = Kind::pattern;
1017
+ storage.pattern = pattern;
1018
+ }
1019
+
1012
1020
SolutionApplicationTargetsKey (
1013
1021
const PatternBindingDecl *patternBinding, unsigned index) {
1014
1022
kind = Kind::patternBindingEntry;
@@ -1040,6 +1048,9 @@ class SolutionApplicationTargetsKey {
1040
1048
case Kind::stmt:
1041
1049
return lhs.storage .stmt == rhs.storage .stmt ;
1042
1050
1051
+ case Kind::pattern:
1052
+ return lhs.storage .pattern == rhs.storage .pattern ;
1053
+
1043
1054
case Kind::patternBindingEntry:
1044
1055
return (lhs.storage .patternBindingEntry .patternBinding
1045
1056
== rhs.storage .patternBindingEntry .patternBinding ) &&
@@ -1081,6 +1092,11 @@ class SolutionApplicationTargetsKey {
1081
1092
DenseMapInfo<unsigned >::getHashValue (static_cast <unsigned >(kind)),
1082
1093
DenseMapInfo<void *>::getHashValue (storage.stmt ));
1083
1094
1095
+ case Kind::pattern:
1096
+ return hash_combine (
1097
+ DenseMapInfo<unsigned >::getHashValue (static_cast <unsigned >(kind)),
1098
+ DenseMapInfo<void *>::getHashValue (storage.pattern ));
1099
+
1084
1100
case Kind::patternBindingEntry:
1085
1101
return hash_combine (
1086
1102
DenseMapInfo<unsigned >::getHashValue (static_cast <unsigned >(kind)),
0 commit comments