Commit 7efb8253 authored by cchen's avatar cchen
Browse files

Revert "OpenMP 5.0 metadirective"

This reverts commit c7d7b98e.
parent c7d7b98e
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -2592,11 +2592,7 @@ enum CXCursorKind {
   */
  CXCursor_OMPUnrollDirective = 293,

  /** OpenMP metadirective directive.
   */
  CXCursor_OMPMetaDirective = 294,

  CXCursor_LastStmt = CXCursor_OMPMetaDirective,
  CXCursor_LastStmt = CXCursor_OMPUnrollDirective,

  /**
   * Cursor that represents the translation unit itself.
+0 −3
Original line number Diff line number Diff line
@@ -2842,9 +2842,6 @@ RecursiveASTVisitor<Derived>::TraverseOMPLoopDirective(OMPLoopDirective *S) {
  return TraverseOMPExecutableDirective(S);
}

DEF_TRAVERSE_STMT(OMPMetaDirective,
                  { TRY_TO(TraverseOMPExecutableDirective(S)); })

DEF_TRAVERSE_STMT(OMPParallelDirective,
                  { TRY_TO(TraverseOMPExecutableDirective(S)); })

+0 −38
Original line number Diff line number Diff line
@@ -5379,44 +5379,6 @@ public:
  }
};

/// This represents '#pragma omp metadirective' directive.
///
/// \code
/// #pragma omp metadirective when(user={condition(N>10)}: parallel for)
/// \endcode
/// In this example directive '#pragma omp metadirective' has clauses 'when'
/// with a dynamic user condition to check if a variable 'N > 10'
///
class OMPMetaDirective final : public OMPExecutableDirective {
  friend class ASTStmtReader;
  friend class OMPExecutableDirective;
  Stmt *IfStmt;

  OMPMetaDirective(SourceLocation StartLoc, SourceLocation EndLoc)
      : OMPExecutableDirective(OMPMetaDirectiveClass,
                               llvm::omp::OMPD_metadirective, StartLoc,
                               EndLoc) {}
  explicit OMPMetaDirective()
      : OMPExecutableDirective(OMPMetaDirectiveClass,
                               llvm::omp::OMPD_metadirective, SourceLocation(),
                               SourceLocation()) {}

  void setIfStmt(Stmt *S) { IfStmt = S; }

public:
  static OMPMetaDirective *Create(const ASTContext &C, SourceLocation StartLoc,
                                  SourceLocation EndLoc,
                                  ArrayRef<OMPClause *> Clauses,
                                  Stmt *AssociatedStmt, Stmt *IfStmt);
  static OMPMetaDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
                                       EmptyShell);
  Stmt *getIfStmt() const { return IfStmt; }

  static bool classof(const Stmt *T) {
    return T->getStmtClass() == OMPMetaDirectiveClass;
  }
};

} // end namespace clang

#endif
+0 −3
Original line number Diff line number Diff line
@@ -1436,9 +1436,6 @@ def warn_omp51_compat_attributes : Warning<
  "specifying OpenMP directives with [[]] is incompatible with OpenMP "
  "standards before OpenMP 5.1">,
  InGroup<OpenMPPre51Compat>, DefaultIgnore;
def err_omp_expected_colon : Error<"missing ':' in %0">;
def err_omp_expected_context_selector
    : Error<"expected valid context selector in %0">;

// Pragma loop support.
def err_pragma_loop_missing_argument : Error<
+0 −2
Original line number Diff line number Diff line
@@ -10794,8 +10794,6 @@ def err_omp_dispatch_statement_call
def err_omp_unroll_full_variable_trip_count : Error<
  "loop to be fully unrolled must have a constant trip count">;
def note_omp_directive_here : Note<"'%0' directive found here">;
def err_omp_instantiation_not_supported
    : Error<"instantiation of '%0' not supported yet">;
} // end of OpenMP category
let CategoryName = "Related Result Type Issue" in {
Loading