[PATCH] [OPENMP] Implemented 'copyin' clause

Alexey Bataev a.bataev at hotmail.com
Sun Mar 30 20:01:24 PDT 2014



================
Comment at: include/clang/AST/OpenMPClause.h:499
@@ +498,3 @@
+class OMPCopyinClause : public OMPVarListClause<OMPCopyinClause> {
+  /// \brief Build clause with number of variables \a N.
+  ///
----------------
hfinkel at anl.gov wrote:
> How about, "Build a clause with \a N variables"?
Ok

================
Comment at: lib/Sema/SemaOpenMP.cpp:1379
@@ +1378,3 @@
+    DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(VD);
+    if (DVar.CKind != OMPC_threadprivate && DVar.CKind != OMPC_copyin) {
+      Diag(ELoc, diag::err_omp_required_access)
----------------
hfinkel at anl.gov wrote:
> Let's move this logic into a member function of DSAVarData so that we can say DVar.isThreadPrivate(). The fact that a copyin variable is a subclass of threadprivate variables should only need to be expressed once.
Agree, I'll add the new method.


http://llvm-reviews.chandlerc.com/D3004



More information about the cfe-commits mailing list