summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-03-07 08:03:37 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-03-07 08:03:37 +0000
commitd178ad4943926f45a95d320c90f89f55b00ec68e (patch)
treeb93bce60910173dc27cfafa0f8290a723b08aa47 /clang/lib/Sema/SemaOpenMP.cpp
parente1974dcd92b0f27e4a8ba54887640b2a93993b40 (diff)
downloadbcm5719-llvm-d178ad4943926f45a95d320c90f89f55b00ec68e.tar.gz
bcm5719-llvm-d178ad4943926f45a95d320c90f89f55b00ec68e.zip
[OPENMP] Small update in threadprivate variables processing to fix template instantiation.
llvm-svn: 203214
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index b99b639ac27..b814706a61a 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -525,8 +525,7 @@ ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope,
}
QualType ExprType = VD->getType().getNonReferenceType();
- ExprResult DE = BuildDeclRefExpr(VD, ExprType, VK_RValue, Id.getLoc());
- DSAStack->addDSA(VD, cast<DeclRefExpr>(DE.get()), OMPC_threadprivate);
+ ExprResult DE = BuildDeclRefExpr(VD, ExprType, VK_LValue, Id.getLoc());
return DE;
}
@@ -582,6 +581,7 @@ OMPThreadPrivateDecl *Sema::CheckOMPThreadPrivateDecl(
}
Vars.push_back(*I);
+ DSAStack->addDSA(VD, DE, OMPC_threadprivate);
}
OMPThreadPrivateDecl *D = 0;
if (!Vars.empty()) {
OpenPOWER on IntegriCloud