diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-17 17:20:53 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-17 17:20:53 +0000 |
commit | 7d2009b4cd8dfa273b4247d479b8642eb03d93ea (patch) | |
tree | aca7f04c9fc0a7321edf2e0643909dff36ee12ca /include | |
parent | 075344345b2a64bf524edd9d7805f8200cbd6578 (diff) | |
download | clang-7d2009b4cd8dfa273b4247d479b8642eb03d93ea.tar.gz clang-7d2009b4cd8dfa273b4247d479b8642eb03d93ea.tar.bz2 clang-7d2009b4cd8dfa273b4247d479b8642eb03d93ea.tar.xz |
Revert "[OPENMP] Initial support for '#pragma omp for'."
This reverts commit r211096. Looks like it broke the msvc build:
SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang-c/Index.h | 6 | ||||
-rw-r--r-- | include/clang/AST/DataRecursiveASTVisitor.h | 5 | ||||
-rw-r--r-- | include/clang/AST/RecursiveASTVisitor.h | 5 | ||||
-rw-r--r-- | include/clang/AST/StmtOpenMP.h | 68 | ||||
-rw-r--r-- | include/clang/Basic/OpenMPKinds.def | 12 | ||||
-rw-r--r-- | include/clang/Basic/OpenMPKinds.h | 37 | ||||
-rw-r--r-- | include/clang/Basic/StmtNodes.td | 1 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 5 | ||||
-rw-r--r-- | include/clang/Serialization/ASTBitCodes.h | 1 |
9 files changed, 1 insertions, 139 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 4deb60b1a5..49d2bc4047 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -2139,11 +2139,7 @@ enum CXCursorKind { */ CXCursor_OMPSimdDirective = 233, - /** \brief OpenMP for directive. - */ - CXCursor_OMPForDirective = 234, - - CXCursor_LastStmt = CXCursor_OMPForDirective, + CXCursor_LastStmt = CXCursor_OMPSimdDirective, /** * \brief Cursor that represents the translation unit itself. diff --git a/include/clang/AST/DataRecursiveASTVisitor.h b/include/clang/AST/DataRecursiveASTVisitor.h index 5679ba3b64..a31965c48b 100644 --- a/include/clang/AST/DataRecursiveASTVisitor.h +++ b/include/clang/AST/DataRecursiveASTVisitor.h @@ -2285,11 +2285,6 @@ DEF_TRAVERSE_STMT(OMPSimdDirective, { return false; }) -DEF_TRAVERSE_STMT(OMPForDirective, { - if (!TraverseOMPExecutableDirective(S)) - return false; -}) - // OpenMP clauses. template <typename Derived> bool RecursiveASTVisitor<Derived>::TraverseOMPClause(OMPClause *C) { diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index 3b756ef384..b0ba684e74 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -2307,11 +2307,6 @@ DEF_TRAVERSE_STMT(OMPSimdDirective, { return false; }) -DEF_TRAVERSE_STMT(OMPForDirective, { - if (!TraverseOMPExecutableDirective(S)) - return false; -}) - // OpenMP clauses. template <typename Derived> bool RecursiveASTVisitor<Derived>::TraverseOMPClause(OMPClause *C) { diff --git a/include/clang/AST/StmtOpenMP.h b/include/clang/AST/StmtOpenMP.h index f8ba48ab05..023720abe8 100644 --- a/include/clang/AST/StmtOpenMP.h +++ b/include/clang/AST/StmtOpenMP.h @@ -255,74 +255,6 @@ public: } }; -/// \brief This represents '#pragma omp for' directive. -/// -/// \code -/// #pragma omp for private(a,b) reduction(+:c,d) -/// \endcode -/// In this example directive '#pragma omp for' has clauses 'private' with the -/// variables 'a' and 'b' and 'reduction' with operator '+' and variables 'c' -/// and 'd'. -/// -class OMPForDirective : public OMPExecutableDirective { - friend class ASTStmtReader; - /// \brief Number of collapsed loops as specified by 'collapse' clause. - unsigned CollapsedNum; - /// \brief Build directive with the given start and end location. - /// - /// \param StartLoc Starting location of the directive kind. - /// \param EndLoc Ending location of the directive. - /// \param CollapsedNum Number of collapsed nested loops. - /// \param NumClauses Number of clauses. - /// - OMPForDirective(SourceLocation StartLoc, SourceLocation EndLoc, - unsigned CollapsedNum, unsigned NumClauses) - : OMPExecutableDirective(this, OMPForDirectiveClass, OMPD_for, StartLoc, - EndLoc, NumClauses, 1), - CollapsedNum(CollapsedNum) {} - - /// \brief Build an empty directive. - /// - /// \param CollapsedNum Number of collapsed nested loops. - /// \param NumClauses Number of clauses. - /// - explicit OMPForDirective(unsigned CollapsedNum, unsigned NumClauses) - : OMPExecutableDirective(this, OMPForDirectiveClass, OMPD_for, - SourceLocation(), SourceLocation(), NumClauses, - 1), - CollapsedNum(CollapsedNum) {} - -public: - /// \brief Creates directive with a list of \a Clauses. - /// - /// \param C AST context. - /// \param StartLoc Starting location of the directive kind. - /// \param EndLoc Ending Location of the directive. - /// \param Clauses List of clauses. - /// \param AssociatedStmt Statement, associated with the directive. - /// - static OMPForDirective *Create(const ASTContext &C, SourceLocation StartLoc, - SourceLocation EndLoc, - ArrayRef<OMPClause *> Clauses, - Stmt *AssociatedStmt); - - /// \brief Creates an empty directive with the place - /// for \a NumClauses clauses. - /// - /// \param C AST context. - /// \param CollapsedNum Number of collapsed nested loops. - /// \param NumClauses Number of clauses. - /// - static OMPForDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses, - unsigned CollapsedNum, EmptyShell); - - unsigned getCollapsedNumber() const { return CollapsedNum; } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == OMPForDirectiveClass; - } -}; - } // end namespace clang #endif diff --git a/include/clang/Basic/OpenMPKinds.def b/include/clang/Basic/OpenMPKinds.def index a4bc961e29..ecef38f7f1 100644 --- a/include/clang/Basic/OpenMPKinds.def +++ b/include/clang/Basic/OpenMPKinds.def @@ -24,9 +24,6 @@ #ifndef OPENMP_SIMD_CLAUSE # define OPENMP_SIMD_CLAUSE(Name) #endif -#ifndef OPENMP_FOR_CLAUSE -# define OPENMP_FOR_CLAUSE(Name) -#endif #ifndef OPENMP_DEFAULT_KIND # define OPENMP_DEFAULT_KIND(Name) #endif @@ -39,7 +36,6 @@ OPENMP_DIRECTIVE(threadprivate) OPENMP_DIRECTIVE(parallel) OPENMP_DIRECTIVE(task) OPENMP_DIRECTIVE(simd) -OPENMP_DIRECTIVE(for) // OpenMP clauses. OPENMP_CLAUSE(if, OMPIfClause) @@ -76,13 +72,6 @@ OPENMP_SIMD_CLAUSE(aligned) OPENMP_SIMD_CLAUSE(safelen) OPENMP_SIMD_CLAUSE(collapse) -// TODO more clauses allowed for directive 'omp for'. -OPENMP_FOR_CLAUSE(private) -OPENMP_FOR_CLAUSE(lastprivate) -OPENMP_FOR_CLAUSE(firstprivate) -OPENMP_FOR_CLAUSE(reduction) -OPENMP_FOR_CLAUSE(collapse) - // Static attributes for 'default' clause. OPENMP_DEFAULT_KIND(none) OPENMP_DEFAULT_KIND(shared) @@ -98,5 +87,4 @@ OPENMP_PROC_BIND_KIND(spread) #undef OPENMP_CLAUSE #undef OPENMP_PARALLEL_CLAUSE #undef OPENMP_SIMD_CLAUSE -#undef OPENMP_FOR_CLAUSE diff --git a/include/clang/Basic/OpenMPKinds.h b/include/clang/Basic/OpenMPKinds.h index 57559074d3..2ee246ec96 100644 --- a/include/clang/Basic/OpenMPKinds.h +++ b/include/clang/Basic/OpenMPKinds.h @@ -64,43 +64,6 @@ const char *getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, unsigned Type); bool isAllowedClauseForDirective(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind); -/// \brief Checks if the specified directive is a directive with an associated -/// loop construct. -/// \param DKind Specified directive. -/// \return true - the directive is a loop-associated directive like 'omp simd' -/// or 'omp for' directive, otherwise - false. -bool isOpenMPLoopDirective(OpenMPDirectiveKind DKind); - -/// \brief Checks if the specified directive is a worksharing directive. -/// \param DKind Specified directive. -/// \return true - the directive is a worksharing directive like 'omp for', -/// otherwise - false. -bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind); - -/// \brief Checks if the specified directive is a parallel-kind directive. -/// \param DKind Specified directive. -/// \return true - the directive is a parallel-like directive like 'omp -/// parallel', otherwise - false. -bool isOpenMPParallelDirective(OpenMPDirectiveKind DKind); - -/// \brief Checks if the specified directive is a simd directive. -/// \param DKind Specified directive. -/// \return true - the directive is a simd directive like 'omp simd', -/// otherwise - false. -bool isOpenMPSimdDirective(OpenMPDirectiveKind DKind); - -/// \brief Checks if the specified clause is one of private clauses like -/// 'private', 'firstprivate', 'reduction' etc.. -/// \param Kind Clause kind. -/// \return true - the clause is a private clause, otherwise - false. -bool isOpenMPPrivate(OpenMPClauseKind Kind); - -/// \brief Checks if the specified clause is one of threadprivate clauses like -/// 'threadprivate', 'copyin' or 'copyprivate'. -/// \param Kind Clause kind. -/// \return true - the clause is a threadprivate clause, otherwise - false. -bool isOpenMPThreadPrivate(OpenMPClauseKind Kind); - } #endif diff --git a/include/clang/Basic/StmtNodes.td b/include/clang/Basic/StmtNodes.td index d04ba597a6..0f0f284476 100644 --- a/include/clang/Basic/StmtNodes.td +++ b/include/clang/Basic/StmtNodes.td @@ -179,4 +179,3 @@ def AsTypeExpr : DStmt<Expr>; def OMPExecutableDirective : Stmt<1>; def OMPParallelDirective : DStmt<OMPExecutableDirective>; def OMPSimdDirective : DStmt<OMPExecutableDirective>; -def OMPForDirective : DStmt<OMPExecutableDirective>; diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 085a482b13..4a21f361a7 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -7312,11 +7312,6 @@ public: Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc); - /// \brief Called on well-formed '\#pragma omp for' after parsing - /// of the associated statement. - StmtResult ActOnOpenMPForDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, - SourceLocation StartLoc, - SourceLocation EndLoc); OMPClause *ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr, diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index cd579ce1df..315c852016 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -1341,7 +1341,6 @@ namespace clang { // OpenMP drectives STMT_OMP_PARALLEL_DIRECTIVE, STMT_OMP_SIMD_DIRECTIVE, - STMT_OMP_FOR_DIRECTIVE, // ARC EXPR_OBJC_BRIDGED_CAST, // ObjCBridgedCastExpr |