diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-25 11:44:49 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-25 11:44:49 +0000 |
commit | 71f61a886646fca18a9dbed747ff34b0faa0dc98 (patch) | |
tree | 9cf6bd28790e4ce856530984d227bf1f316c5e71 /tools | |
parent | ab6dc444704d6f49ebc9ed60cc9fec0ec034b384 (diff) | |
download | clang-71f61a886646fca18a9dbed747ff34b0faa0dc98.tar.gz clang-71f61a886646fca18a9dbed747ff34b0faa0dc98.tar.bz2 clang-71f61a886646fca18a9dbed747ff34b0faa0dc98.tar.xz |
[OPENMP] Initial support for 'sections' directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CIndex.cpp | 7 | ||||
-rw-r--r-- | tools/libclang/CXCursor.cpp | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 787c28b21e..ab0cd6fdda 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -1852,6 +1852,7 @@ public: void VisitOMPParallelDirective(const OMPParallelDirective *D); void VisitOMPSimdDirective(const OMPSimdDirective *D); void VisitOMPForDirective(const OMPForDirective *D); + void VisitOMPSectionsDirective(const OMPSectionsDirective *D); private: void AddDeclarationNameInfo(const Stmt *S); @@ -2287,6 +2288,10 @@ void EnqueueVisitor::VisitOMPForDirective(const OMPForDirective *D) { VisitOMPExecutableDirective(D); } +void EnqueueVisitor::VisitOMPSectionsDirective(const OMPSectionsDirective *D) { + VisitOMPExecutableDirective(D); +} + void CursorVisitor::EnqueueWorkList(VisitorWorkList &WL, const Stmt *S) { EnqueueVisitor(WL, MakeCXCursor(S, StmtParent, TU,RegionOfInterest)).Visit(S); } @@ -3965,6 +3970,8 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) { return cxstring::createRef("OMPSimdDirective"); case CXCursor_OMPForDirective: return cxstring::createRef("OMPForDirective"); + case CXCursor_OMPSectionsDirective: + return cxstring::createRef("OMPSectionsDirective"); } llvm_unreachable("Unhandled CXCursorKind"); diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index 7418c29741..ad8c7df70b 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -522,6 +522,9 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent, case Stmt::OMPForDirectiveClass: K = CXCursor_OMPForDirective; break; + case Stmt::OMPSectionsDirectiveClass: + K = CXCursor_OMPSectionsDirective; + break; } CXCursor C = { K, 0, { Parent, S, TU } }; |