From 71f61a886646fca18a9dbed747ff34b0faa0dc98 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 25 Jun 2014 11:44:49 +0000 Subject: [OPENMP] Initial support for 'sections' directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211685 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/libclang/CIndex.cpp | 7 +++++++ tools/libclang/CXCursor.cpp | 3 +++ 2 files changed, 10 insertions(+) (limited to 'tools/libclang') 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 } }; -- cgit v1.2.3