diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-08-18 06:47:21 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-08-18 06:47:21 +0000 |
commit | bd9fec1eaacb7f0769017aef8f6f6453dd160b7f (patch) | |
tree | 835f6e7bf3f7d0d34ef6536db38a40fc442868a7 /clang/lib/AST/StmtProfile.cpp | |
parent | 3c32c83daa5e7ceda3f5cb7cd3bf4059c197a202 (diff) | |
download | bcm5719-llvm-bd9fec1eaacb7f0769017aef8f6f6453dd160b7f.tar.gz bcm5719-llvm-bd9fec1eaacb7f0769017aef8f6f6453dd160b7f.zip |
[OPENMP 4.1] Allow variables with reference types in private clauses.
OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types.
llvm-svn: 245268
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index fa1be8644b9..0318330abbd 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -384,6 +384,9 @@ void OMPClauseProfiler::VisitOMPReductionClause( } void OMPClauseProfiler::VisitOMPLinearClause(const OMPLinearClause *C) { VisitOMPClauseList(C); + for (auto *E : C->privates()) { + Profiler->VisitStmt(E); + } for (auto *E : C->inits()) { Profiler->VisitStmt(E); } |