diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-17 11:49:22 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-17 11:49:22 +0000 |
commit | 46c5afbd7070bb8b4329331f5bac3d31078e3d01 (patch) | |
tree | a86375d52d3da44e2fa6f0529615716e4d31de8e /tools | |
parent | 5bb28629c0fba013b1342ddf6a7e0708cbc67fb4 (diff) | |
download | clang-46c5afbd7070bb8b4329331f5bac3d31078e3d01.tar.gz clang-46c5afbd7070bb8b4329331f5bac3d31078e3d01.tar.bz2 clang-46c5afbd7070bb8b4329331f5bac3d31078e3d01.tar.xz |
[OPENMP] Initial support for '#pragma omp for'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211096 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 962e3a3406..90346d0e44 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -1851,6 +1851,7 @@ public: void VisitOMPExecutableDirective(const OMPExecutableDirective *D); void VisitOMPParallelDirective(const OMPParallelDirective *D); void VisitOMPSimdDirective(const OMPSimdDirective *D); + void VisitOMPForDirective(const OMPForDirective *D); private: void AddDeclarationNameInfo(const Stmt *S); @@ -2274,6 +2275,10 @@ void EnqueueVisitor::VisitOMPSimdDirective(const OMPSimdDirective *D) { VisitOMPExecutableDirective(D); } +void EnqueueVisitor::VisitOMPForDirective(const OMPForDirective *D) { + VisitOMPExecutableDirective(D); +} + void CursorVisitor::EnqueueWorkList(VisitorWorkList &WL, const Stmt *S) { EnqueueVisitor(WL, MakeCXCursor(S, StmtParent, TU,RegionOfInterest)).Visit(S); } @@ -3950,6 +3955,8 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) { return cxstring::createRef("OMPParallelDirective"); case CXCursor_OMPSimdDirective: return cxstring::createRef("OMPSimdDirective"); + case CXCursor_OMPForDirective: + return cxstring::createRef("OMPForDirective"); } llvm_unreachable("Unhandled CXCursorKind"); diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index 8c9945c3ae..7418c29741 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -519,6 +519,9 @@ CXCursor cxcursor::MakeCXCursor(const Stmt *S, const Decl *Parent, case Stmt::OMPSimdDirectiveClass: K = CXCursor_OMPSimdDirective; break; + case Stmt::OMPForDirectiveClass: + K = CXCursor_OMPForDirective; + break; } CXCursor C = { K, 0, { Parent, S, TU } }; |