[OPENMP50]Support 'destroy' clause on 'depobj' directives.
Added basic support (parsing/sema/serialization) for 'destroy' clause in
depobj directives.
diff --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp
index 888dc30..2bd02a0 100644
--- a/clang/lib/AST/OpenMPClause.cpp
+++ b/clang/lib/AST/OpenMPClause.cpp
@@ -143,6 +143,7 @@
case OMPC_match:
case OMPC_nontemporal:
case OMPC_order:
+ case OMPC_destroy:
break;
}
@@ -228,6 +229,7 @@
case OMPC_match:
case OMPC_nontemporal:
case OMPC_order:
+ case OMPC_destroy:
break;
}
@@ -1423,6 +1425,10 @@
OS << ")";
}
+void OMPClausePrinter::VisitOMPDestroyClause(OMPDestroyClause *) {
+ OS << "destroy";
+}
+
template<typename T>
void OMPClausePrinter::VisitOMPClauseList(T *Node, char StartSym) {
for (typename T::varlist_iterator I = Node->varlist_begin(),
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index bf0cc52..9f11983 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -532,6 +532,8 @@
void OMPClauseProfiler::VisitOMPNogroupClause(const OMPNogroupClause *) {}
+void OMPClauseProfiler::VisitOMPDestroyClause(const OMPDestroyClause *) {}
+
template<typename T>
void OMPClauseProfiler::VisitOMPClauseList(T *Node) {
for (auto *E : Node->varlists()) {