diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-18 04:14:57 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-18 04:14:57 +0000 |
commit | b23263a1ac3e4c6080c2b1f56cc42d2f24faf856 (patch) | |
tree | f26d7c1d5fa22602e10da6c02436ce553ffc78fc /tools | |
parent | 6356f564c351af8b22e7c2699d52e2062ae9e76e (diff) | |
download | clang-b23263a1ac3e4c6080c2b1f56cc42d2f24faf856.tar.gz clang-b23263a1ac3e4c6080c2b1f56cc42d2f24faf856.tar.bz2 clang-b23263a1ac3e4c6080c2b1f56cc42d2f24faf856.tar.xz |
[OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with MSVC).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211140 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 cbe7cf5346..2c01c50513 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -1852,6 +1852,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); @@ -2275,6 +2276,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); } @@ -3949,6 +3954,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 } }; |