r260215 - [OPENMP] Allow to use the variable in the same 'threadprivate'

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 9 01:41:42 PST 2016


Author: abataev
Date: Tue Feb  9 03:41:42 2016
New Revision: 260215

URL: http://llvm.org/viewvc/llvm-project?rev=260215&view=rev
Log:
[OPENMP] Allow to use the variable in the same 'threadprivate'
directive.

Modified:
    cfe/trunk/lib/Sema/SemaOpenMP.cpp

Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=260215&r1=260214&r2=260215&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Tue Feb  9 03:41:42 2016
@@ -1289,9 +1289,6 @@ Sema::CheckOMPThreadPrivateDecl(SourceLo
         continue;
     }
 
-    // Variable is marked already - no need to check.
-    if (DSAStack->isThreadPrivate(VD))
-      continue;
     Vars.push_back(RefExpr);
     DSAStack->addDSA(VD, DE, OMPC_threadprivate);
     VD->addAttr(OMPThreadPrivateDeclAttr::CreateImplicit(




More information about the cfe-commits mailing list