================
@@ -5216,6 +5230,38 @@ QualType ASTContext::getDependentBitIntType(bool 
IsUnsigned,
   return QualType(New, 0);
 }
 
+QualType
+ASTContext::getPredefinedSugarType(PredefinedSugarType::Kind KD) const {
+  llvm::FoldingSetNodeID ID;
+  PredefinedSugarType::Profile(ID, llvm::to_underlying(KD));
+
+  void *InsertPos = nullptr;
+  if (PredefinedSugarType *Existing =
+          PredefinedSugarTypes.FindNodeOrInsertPos(ID, InsertPos))
+    return QualType(Existing, 0);
----------------
mizvekov wrote:

I mentioned this in another comment, but it's a waste to use a hash table to 
unique a set with only 3 possible elements. You could just use an array instead.

https://github.com/llvm/llvm-project/pull/143653
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to