summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtProfile.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-03-04 07:21:16 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-03-04 07:21:16 +0000
commit37e594c79966900734dd1cc1bda3a9cafc48cd85 (patch)
tree13eb8da3e6ac6bbc207022055b4eca08d0d7dcd3 /clang/lib/AST/StmtProfile.cpp
parent7332106499eb8ef7cb98fe100df486b3ac2be073 (diff)
downloadbcm5719-llvm-37e594c79966900734dd1cc1bda3a9cafc48cd85.tar.gz
bcm5719-llvm-37e594c79966900734dd1cc1bda3a9cafc48cd85.zip
[OPENMP] Simplify handling of clauses with postupdates, NFC.
Clauses with post-update expressions always have pre-init statement. So OMPClauseWithPreInit now is the base for OMPClauseWithPostUpdate. llvm-svn: 262696
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r--clang/lib/AST/StmtProfile.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index c0da73d2962..442e32a8adf 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -280,6 +280,7 @@ void OMPClauseProfiler::VistOMPClauseWithPreInit(
void OMPClauseProfiler::VistOMPClauseWithPostUpdate(
const OMPClauseWithPostUpdate *C) {
+ VistOMPClauseWithPreInit(C);
if (auto *E = C->getPostUpdateExpr())
Profiler->VisitStmt(E);
}
@@ -378,7 +379,6 @@ OMPClauseProfiler::VisitOMPFirstprivateClause(const OMPFirstprivateClause *C) {
void
OMPClauseProfiler::VisitOMPLastprivateClause(const OMPLastprivateClause *C) {
VisitOMPClauseList(C);
- VistOMPClauseWithPreInit(C);
VistOMPClauseWithPostUpdate(C);
for (auto *E : C->source_exprs()) {
Profiler->VisitStmt(E);
@@ -399,7 +399,6 @@ void OMPClauseProfiler::VisitOMPReductionClause(
C->getQualifierLoc().getNestedNameSpecifier());
Profiler->VisitName(C->getNameInfo().getName());
VisitOMPClauseList(C);
- VistOMPClauseWithPreInit(C);
VistOMPClauseWithPostUpdate(C);
for (auto *E : C->privates()) {
Profiler->VisitStmt(E);
OpenPOWER on IntegriCloud