summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorcchen <cchen@cray.com>2019-12-04 14:36:07 -0500
committerAlexey Bataev <a.bataev@hotmail.com>2019-12-04 14:53:17 -0500
commit713dab21e27c987b9114547ce7136bac2e775de9 (patch)
tree696ff853d8c9db4fab6b73fbfcab6de0c4185d0d /clang/tools
parent9e978bb01ceae8eaa415d8951cc96803e68b73fb (diff)
downloadbcm5719-llvm-713dab21e27c987b9114547ce7136bac2e775de9.tar.gz
bcm5719-llvm-713dab21e27c987b9114547ce7136bac2e775de9.zip
[OpenMP50] Add parallel master construct, by Chi Chun Chen.
Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp8
-rw-r--r--clang/tools/libclang/CXCursor.cpp3
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index a8222356db4..09aa0b25038 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2030,6 +2030,7 @@ public:
void VisitOMPCriticalDirective(const OMPCriticalDirective *D);
void VisitOMPParallelForDirective(const OMPParallelForDirective *D);
void VisitOMPParallelForSimdDirective(const OMPParallelForSimdDirective *D);
+ void VisitOMPParallelMasterDirective(const OMPParallelMasterDirective *D);
void VisitOMPParallelSectionsDirective(const OMPParallelSectionsDirective *D);
void VisitOMPTaskDirective(const OMPTaskDirective *D);
void VisitOMPTaskyieldDirective(const OMPTaskyieldDirective *D);
@@ -2811,6 +2812,11 @@ void EnqueueVisitor::VisitOMPParallelForSimdDirective(
VisitOMPLoopDirective(D);
}
+void EnqueueVisitor::VisitOMPParallelMasterDirective(
+ const OMPParallelMasterDirective *D) {
+ VisitOMPExecutableDirective(D);
+}
+
void EnqueueVisitor::VisitOMPParallelSectionsDirective(
const OMPParallelSectionsDirective *D) {
VisitOMPExecutableDirective(D);
@@ -5455,6 +5461,8 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) {
return cxstring::createRef("OMPParallelForDirective");
case CXCursor_OMPParallelForSimdDirective:
return cxstring::createRef("OMPParallelForSimdDirective");
+ case CXCursor_OMPParallelMasterDirective:
+ return cxstring::createRef("OMPParallelMasterDirective");
case CXCursor_OMPParallelSectionsDirective:
return cxstring::createRef("OMPParallelSectionsDirective");
case CXCursor_OMPTaskDirective:
diff --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp
index 750872f37c2..3632e0f85d1 100644
--- a/clang/tools/libclang/CXCursor.cpp
+++ b/clang/tools/libclang/CXCursor.cpp
@@ -610,6 +610,9 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent,
case Stmt::OMPParallelForSimdDirectiveClass:
K = CXCursor_OMPParallelForSimdDirective;
break;
+ case Stmt::OMPParallelMasterDirectiveClass:
+ K = CXCursor_OMPParallelMasterDirective;
+ break;
case Stmt::OMPParallelSectionsDirectiveClass:
K = CXCursor_OMPParallelSectionsDirective;
break;
OpenPOWER on IntegriCloud