diff options
author | Alexander Musman <alexander.musman@gmail.com> | 2014-05-27 15:12:19 +0000 |
---|---|---|
committer | Alexander Musman <alexander.musman@gmail.com> | 2014-05-27 15:12:19 +0000 |
commit | 8bd31e69a441bb7178134de57bc60c22be8e0f3c (patch) | |
tree | 03c7c30a004a5d9aa29ba6ec4ad5ba26d832ef2a /clang/lib/AST | |
parent | b355e8f604d3b26f15990b478a126b254a0fd9b8 (diff) | |
download | bcm5719-llvm-8bd31e69a441bb7178134de57bc60c22be8e0f3c.tar.gz bcm5719-llvm-8bd31e69a441bb7178134de57bc60c22be8e0f3c.zip |
Parsing/Sema for OMPCollapseClause.
Actual usage in Sema for collapsing loops will in some future patch.
llvm-svn: 209660
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 6 | ||||
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index e5f24dc5d5e..0804d4089bb 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -608,6 +608,12 @@ void OMPClausePrinter::VisitOMPSafelenClause(OMPSafelenClause *Node) { OS << ")"; } +void OMPClausePrinter::VisitOMPCollapseClause(OMPCollapseClause *Node) { + OS << "collapse("; + Node->getNumForLoops()->printPretty(OS, nullptr, Policy, 0); + OS << ")"; +} + void OMPClausePrinter::VisitOMPDefaultClause(OMPDefaultClause *Node) { OS << "default(" << getOpenMPSimpleClauseTypeName(OMPC_default, Node->getDefaultKind()) diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 5dbaa0e8327..9cff6d67437 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -279,6 +279,11 @@ void OMPClauseProfiler::VisitOMPSafelenClause(const OMPSafelenClause *C) { Profiler->VisitStmt(C->getSafelen()); } +void OMPClauseProfiler::VisitOMPCollapseClause(const OMPCollapseClause *C) { + if (C->getNumForLoops()) + Profiler->VisitStmt(C->getNumForLoops()); +} + void OMPClauseProfiler::VisitOMPDefaultClause(const OMPDefaultClause *C) { } void OMPClauseProfiler::VisitOMPProcBindClause(const OMPProcBindClause *C) { } |