================
@@ -218,19 +218,37 @@ struct PFPField {
FieldDecl *Field;
};
+/// UniquingSet info for pools keyed on a QualType and a bool. DenseMapInfo has
+/// no bool specialization, so we cannot use the default UniquingSetInfo.
+struct QualTypeBoolInfo {
+ using KeyTy = std::pair<QualType, bool>;
+
+ template <typename T> static KeyTy getKey(const T &N) { return N.getKey(); }
+
+ static unsigned getHashValue(const KeyTy &Key) {
+ return llvm::hash_combine(Key.first.getAsOpaquePtr(), Key.second);
+ }
+
+ template <typename T> static bool isEqual(const KeyTy &Key, const T &N) {
+ return Key == N.getKey();
+ }
+};
----------------
ChuanqiXu9 wrote:
This smells slightly odd as it looks like it can't generalize to other Type's
Profile kind.
https://github.com/llvm/llvm-project/pull/221850
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits