]> granicus.if.org Git - clang/commitdiff
[OPENMP] Simplified data-sharing attributes analysis.
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 18 Mar 2014 10:23:46 +0000 (10:23 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 18 Mar 2014 10:23:46 +0000 (10:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204135 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOpenMP.cpp

index 1e1dbfed0b82496ca7382c6488a60ab191ae6732..9fb7522ce511fd037ff11c4dfd7e00b2e95c2f76 100644 (file)
@@ -134,22 +134,7 @@ DSAStackTy::DSAVarData DSAStackTy::getDSA(StackTy::reverse_iterator Iter,
                                           VarDecl *D) {
   DSAVarData DVar;
   if (Iter == Stack.rend() - 1) {
-    // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
-    // in a region but not in construct]
-    //  File-scope or namespace-scope variables referenced in called routines
-    //  in the region are shared unless they appear in a threadprivate
-    //  directive.
-    // TODO
-    if (!D->isFunctionOrMethodVarDecl())
-      DVar.CKind = OMPC_shared;
-
-    // OpenMP [2.9.1.2, Data-sharing Attribute Rules for Variables Referenced
-    // in a region but not in construct]
-    //  Variables with static storage duration that are declared in called
-    //  routines in the region are shared.
-    if (D->hasGlobalStorage())
-      DVar.CKind = OMPC_shared;
-
+    DVar.CKind = OMPC_shared;
     return DVar;
   }