[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

Doug Wyatt via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 10 09:33:46 PDT 2024


================
@@ -464,6 +466,16 @@ class ASTContext : public RefCountedBase<ASTContext> {
   /// This is the top-level (C++20) Named module we are building.
   Module *CurrentCXXNamedModule = nullptr;
 
+  class FunctionEffectSetUniquing {
+    llvm::DenseSet<llvm::ArrayRef<FunctionEffect>> Set;
+
+  public:
+    FunctionEffectSet getUniqued(llvm::ArrayRef<FunctionEffect> FX);
+
+    ~FunctionEffectSetUniquing();
+  };
+  FunctionEffectSetUniquing UniquedFunctionEffectSet;
+
----------------
dougsonos wrote:

The idea here was that since the set elements are `ArrayRef`s pointing to separately allocated memory, the destructor of this object could do all the destruction. Moot if this uniquing business goes away though.

https://github.com/llvm/llvm-project/pull/84983


More information about the cfe-commits mailing list