diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-06-18 12:14:09 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-06-18 12:14:09 +0000 |
commit | c30dd2daf9fd65364da9b1ac839b88b809de41d8 (patch) | |
tree | c613c4b972a539156e3baf70b4de5f90b7585cc2 /clang/tools | |
parent | 22ef2c3e301d375211f700d75eaded2ce8cb1c1b (diff) | |
download | bcm5719-llvm-c30dd2daf9fd65364da9b1ac839b88b809de41d8.tar.gz bcm5719-llvm-c30dd2daf9fd65364da9b1ac839b88b809de41d8.zip |
[OPENMP] Support for '#pragma omp taskgroup' directive.
Added parsing, sema analysis and codegen for '#pragma omp taskgroup' directive (OpenMP 4.0).
The code for directive is generated the following way:
#pragma omp taskgroup
<body>
void __kmpc_taskgroup(<loc>, thread_id);
<body>
void __kmpc_end_taskgroup(<loc>, thread_id);
llvm-svn: 240011
Diffstat (limited to 'clang/tools')
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 8 | ||||
-rw-r--r-- | clang/tools/libclang/CXCursor.cpp | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 05287bd856e..bdefa9b71b0 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1879,6 +1879,7 @@ public: void VisitOMPTaskyieldDirective(const OMPTaskyieldDirective *D); void VisitOMPBarrierDirective(const OMPBarrierDirective *D); void VisitOMPTaskwaitDirective(const OMPTaskwaitDirective *D); + void VisitOMPTaskgroupDirective(const OMPTaskgroupDirective *D); void VisitOMPFlushDirective(const OMPFlushDirective *D); void VisitOMPOrderedDirective(const OMPOrderedDirective *D); void VisitOMPAtomicDirective(const OMPAtomicDirective *D); @@ -2478,6 +2479,11 @@ void EnqueueVisitor::VisitOMPTaskwaitDirective(const OMPTaskwaitDirective *D) { VisitOMPExecutableDirective(D); } +void EnqueueVisitor::VisitOMPTaskgroupDirective( + const OMPTaskgroupDirective *D) { + VisitOMPExecutableDirective(D); +} + void EnqueueVisitor::VisitOMPFlushDirective(const OMPFlushDirective *D) { VisitOMPExecutableDirective(D); } @@ -4260,6 +4266,8 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) { return cxstring::createRef("OMPBarrierDirective"); case CXCursor_OMPTaskwaitDirective: return cxstring::createRef("OMPTaskwaitDirective"); + case CXCursor_OMPTaskgroupDirective: + return cxstring::createRef("OMPTaskgroupDirective"); case CXCursor_OMPFlushDirective: return cxstring::createRef("OMPFlushDirective"); case CXCursor_OMPOrderedDirective: diff --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp index 68334d4e14f..b8bb28ed853 100644 --- a/clang/tools/libclang/CXCursor.cpp +++ b/clang/tools/libclang/CXCursor.cpp @@ -570,6 +570,9 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent, case Stmt::OMPTaskwaitDirectiveClass: K = CXCursor_OMPTaskwaitDirective; break; + case Stmt::OMPTaskgroupDirectiveClass: + K = CXCursor_OMPTaskgroupDirective; + break; case Stmt::OMPFlushDirectiveClass: K = CXCursor_OMPFlushDirective; break; |