================
@@ -518,12 +523,19 @@ class CIRGenFunction : public CIRGenTypeCache {
     symbolTable.insert(vd, addr.getPointer());
   }
 
-  /// Removes a declaration from the address-relationship.  This is a function
-  /// that shouldn't need to be used except in cases where we're 
adding/removing
-  /// things that aren't part of the language-semantics AST.
-  void removeAddrOfLocalVar(const clang::VarDecl *vd) {
-    localDeclMap.erase(vd);
-  }
+  // A class to allow inserting things into the declaration map during some 
sort
+  // of alternative generation (used currently for the OpenACC recipe
+  // generation), then reverting changes after the fact.
+  class DeclMapRevertingRAII {
----------------
andykaylor wrote:

This seems to have a similar purpose to `ParamReferenceReplacerRAII` in the 
incubator. That one requires explicitly adding replacement variables and only 
removes the explicit mappings. The advantage is that it doesn't require copying 
the entire map.

In the uses here, do you expect any addresses to be added to the map other than 
clause parameters?

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

Reply via email to