tianshilei1992 added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenFunction.h:1070
     void operator=(const OMPPrivateScope &) = delete;
+    bool MapRestored = false;
 
----------------
ABataev wrote:
> Better to make it a property of MappedVars. Also, are there any issues if 
> just restore it several times without checking?
> Better to make it a property of MappedVars.
Will do.
> Also, are there any issues if just restore it several times without checking?
TBH, I don't know clearly, but I feel it should not be a problem. We will not 
have two scopes at the same time, will we? But I will add an assertion that if 
the mapped variables have been restored, `addPrivate` should not be called 
anymore.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131272/new/

https://reviews.llvm.org/D131272

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to