Coverage Report

Created: 2019-04-21 11:35

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/AST/StmtOpenMP.h
Line
Count
Source (jump to first uncovered line)
1
//===- StmtOpenMP.h - Classes for OpenMP directives  ------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
/// \file
9
/// This file defines OpenMP AST classes for executable directives and
10
/// clauses.
11
///
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_AST_STMTOPENMP_H
15
#define LLVM_CLANG_AST_STMTOPENMP_H
16
17
#include "clang/AST/Expr.h"
18
#include "clang/AST/OpenMPClause.h"
19
#include "clang/AST/Stmt.h"
20
#include "clang/Basic/OpenMPKinds.h"
21
#include "clang/Basic/SourceLocation.h"
22
23
namespace clang {
24
25
//===----------------------------------------------------------------------===//
26
// AST classes for directives.
27
//===----------------------------------------------------------------------===//
28
29
/// This is a basic class for representing single OpenMP executable
30
/// directive.
31
///
32
class OMPExecutableDirective : public Stmt {
33
  friend class ASTStmtReader;
34
  /// Kind of the directive.
35
  OpenMPDirectiveKind Kind;
36
  /// Starting location of the directive (directive keyword).
37
  SourceLocation StartLoc;
38
  /// Ending location of the directive.
39
  SourceLocation EndLoc;
40
  /// Numbers of clauses.
41
  const unsigned NumClauses;
42
  /// Number of child expressions/stmts.
43
  const unsigned NumChildren;
44
  /// Offset from this to the start of clauses.
45
  /// There are NumClauses pointers to clauses, they are followed by
46
  /// NumChildren pointers to child stmts/exprs (if the directive type
47
  /// requires an associated stmt, then it has to be the first of them).
48
  const unsigned ClausesOffset;
49
50
  /// Get the clauses storage.
51
601k
  MutableArrayRef<OMPClause *> getClauses() {
52
601k
    OMPClause **ClauseStorage = reinterpret_cast<OMPClause **>(
53
601k
        reinterpret_cast<char *>(this) + ClausesOffset);
54
601k
    return MutableArrayRef<OMPClause *>(ClauseStorage, NumClauses);
55
601k
  }
56
57
protected:
58
  /// Build instance of directive of class \a K.
59
  ///
60
  /// \param SC Statement class.
61
  /// \param K Kind of OpenMP directive.
62
  /// \param StartLoc Starting location of the directive (directive keyword).
63
  /// \param EndLoc Ending location of the directive.
64
  ///
65
  template <typename T>
66
  OMPExecutableDirective(const T *, StmtClass SC, OpenMPDirectiveKind K,
67
                         SourceLocation StartLoc, SourceLocation EndLoc,
68
                         unsigned NumClauses, unsigned NumChildren)
69
      : Stmt(SC), Kind(K), StartLoc(std::move(StartLoc)),
70
        EndLoc(std::move(EndLoc)), NumClauses(NumClauses),
71
        NumChildren(NumChildren),
72
25.8k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelDirective>(clang::OMPParallelDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
1.91k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSimdDirective>(clang::OMPSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
481
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPForDirective>(clang::OMPForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
634
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPForSimdDirective>(clang::OMPForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
371
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSectionsDirective>(clang::OMPSectionsDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
29
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSectionDirective>(clang::OMPSectionDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
45
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSingleDirective>(clang::OMPSingleDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
133
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPMasterDirective>(clang::OMPMasterDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
11
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPCriticalDirective>(clang::OMPCriticalDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
177
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelForDirective>(clang::OMPParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
730
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelForSimdDirective>(clang::OMPParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
504
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelSectionsDirective>(clang::OMPParallelSectionsDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
488
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskDirective>(clang::OMPTaskDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
101
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskyieldDirective>(clang::OMPTaskyieldDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
15
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPBarrierDirective>(clang::OMPBarrierDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
45
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskwaitDirective>(clang::OMPTaskwaitDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
5
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskgroupDirective>(clang::OMPTaskgroupDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
232
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPCancellationPointDirective>(clang::OMPCancellationPointDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
8
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPCancelDirective>(clang::OMPCancelDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
27
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPFlushDirective>(clang::OMPFlushDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
22
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPOrderedDirective>(clang::OMPOrderedDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
85
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPAtomicDirective>(clang::OMPAtomicDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
258
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetDirective>(clang::OMPTargetDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
4.97k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetParallelDirective>(clang::OMPTargetParallelDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
888
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetParallelForDirective>(clang::OMPTargetParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
551
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetDataDirective>(clang::OMPTargetDataDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
368
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetEnterDataDirective>(clang::OMPTargetEnterDataDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
41
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetExitDataDirective>(clang::OMPTargetExitDataDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
142
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDirective>(clang::OMPTeamsDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
2.36k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskLoopDirective>(clang::OMPTaskLoopDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
411
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskLoopSimdDirective>(clang::OMPTaskLoopSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
274
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeDirective>(clang::OMPDistributeDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
212
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetUpdateDirective>(clang::OMPTargetUpdateDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
145
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeParallelForDirective>(clang::OMPDistributeParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
592
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeParallelForSimdDirective>(clang::OMPDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
756
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeSimdDirective>(clang::OMPDistributeSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
361
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetParallelForSimdDirective>(clang::OMPTargetParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
997
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetSimdDirective>(clang::OMPTargetSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
524
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeDirective>(clang::OMPTeamsDistributeDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
422
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeSimdDirective>(clang::OMPTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
417
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeParallelForSimdDirective>(clang::OMPTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
290
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeParallelForDirective>(clang::OMPTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
515
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDirective>(clang::OMPTargetTeamsDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
1.04k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeDirective>(clang::OMPTargetTeamsDistributeDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
559
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeParallelForDirective>(clang::OMPTargetTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
780
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeParallelForSimdDirective>(clang::OMPTargetTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
1.07k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeSimdDirective>(clang::OMPTargetTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
72
801
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
73
74
  /// Sets the list of variables for this clause.
75
  ///
76
  /// \param Clauses The list of clauses for the directive.
77
  ///
78
  void setClauses(ArrayRef<OMPClause *> Clauses);
79
80
  /// Set the associated statement for the directive.
81
  ///
82
  /// /param S Associated statement.
83
  ///
84
25.6k
  void setAssociatedStmt(Stmt *S) {
85
25.6k
    assert(hasAssociatedStmt() && "no associated statement.");
86
25.6k
    *child_begin() = S;
87
25.6k
  }
88
89
public:
90
  /// Iterates over a filtered subrange of clauses applied to a
91
  /// directive.
92
  ///
93
  /// This iterator visits only clauses of type SpecificClause.
94
  template <typename SpecificClause>
95
  class specific_clause_iterator
96
      : public llvm::iterator_adaptor_base<
97
            specific_clause_iterator<SpecificClause>,
98
            ArrayRef<OMPClause *>::const_iterator, std::forward_iterator_tag,
99
            const SpecificClause *, ptrdiff_t, const SpecificClause *,
100
            const SpecificClause *> {
101
    ArrayRef<OMPClause *>::const_iterator End;
102
103
108k
    void SkipToNextClause() {
104
166k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)63.0k
)
105
58.1k
        ++this->I;
106
108k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::SkipToNextClause()
Line
Count
Source
103
15.7k
    void SkipToNextClause() {
104
24.1k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8.60k
)
105
8.47k
        ++this->I;
106
15.7k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::SkipToNextClause()
Line
Count
Source
103
1.77k
    void SkipToNextClause() {
104
2.93k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.27k
)
105
1.16k
        ++this->I;
106
1.77k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::SkipToNextClause()
Line
Count
Source
103
6.50k
    void SkipToNextClause() {
104
8.78k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)3.47k
)
105
2.27k
        ++this->I;
106
6.50k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::SkipToNextClause()
Line
Count
Source
103
1.38k
    void SkipToNextClause() {
104
2.30k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)931
)
105
926
        ++this->I;
106
1.38k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::SkipToNextClause()
Line
Count
Source
103
4.26k
    void SkipToNextClause() {
104
6.32k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)2.85k
)
105
2.06k
        ++this->I;
106
4.26k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::SkipToNextClause()
Line
Count
Source
103
2.04k
    void SkipToNextClause() {
104
3.12k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.16k
)
105
1.07k
        ++this->I;
106
2.04k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::SkipToNextClause()
Line
Count
Source
103
1.94k
    void SkipToNextClause() {
104
3.07k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.21k
)
105
1.13k
        ++this->I;
106
1.94k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::SkipToNextClause()
Line
Count
Source
103
3.63k
    void SkipToNextClause() {
104
5.67k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)2.30k
)
105
2.03k
        ++this->I;
106
3.63k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::SkipToNextClause()
Line
Count
Source
103
1.92k
    void SkipToNextClause() {
104
3.17k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.29k
)
105
1.25k
        ++this->I;
106
1.92k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::SkipToNextClause()
Line
Count
Source
103
1.80k
    void SkipToNextClause() {
104
2.98k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.22k
)
105
1.17k
        ++this->I;
106
1.80k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::SkipToNextClause()
Line
Count
Source
103
37
    void SkipToNextClause() {
104
79
      while (this->I != End && 
!isa<SpecificClause>(*this->I)45
)
105
42
        ++this->I;
106
37
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::SkipToNextClause()
Line
Count
Source
103
38
    void SkipToNextClause() {
104
79
      while (this->I != End && 
!isa<SpecificClause>(*this->I)45
)
105
41
        ++this->I;
106
38
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::SkipToNextClause()
Line
Count
Source
103
50
    void SkipToNextClause() {
104
95
      while (this->I != End && 
!isa<SpecificClause>(*this->I)53
)
105
45
        ++this->I;
106
50
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::SkipToNextClause()
Line
Count
Source
103
1.43k
    void SkipToNextClause() {
104
2.09k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)943
)
105
662
        ++this->I;
106
1.43k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::SkipToNextClause()
Line
Count
Source
103
10.6k
    void SkipToNextClause() {
104
17.2k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)6.92k
)
105
6.63k
        ++this->I;
106
10.6k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::SkipToNextClause()
Line
Count
Source
103
6.98k
    void SkipToNextClause() {
104
11.4k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)4.55k
)
105
4.43k
        ++this->I;
106
6.98k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::SkipToNextClause()
Line
Count
Source
103
1.33k
    void SkipToNextClause() {
104
2.19k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)878
)
105
863
        ++this->I;
106
1.33k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::SkipToNextClause()
Line
Count
Source
103
1.68k
    void SkipToNextClause() {
104
2.82k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.19k
)
105
1.14k
        ++this->I;
106
1.68k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::SkipToNextClause()
Line
Count
Source
103
1.61k
    void SkipToNextClause() {
104
2.64k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.05k
)
105
1.02k
        ++this->I;
106
1.61k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::SkipToNextClause()
Line
Count
Source
103
2.80k
    void SkipToNextClause() {
104
4.74k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.98k
)
105
1.94k
        ++this->I;
106
2.80k
    }
Unexecuted instantiation: clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::SkipToNextClause()
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::SkipToNextClause()
Line
Count
Source
103
6.78k
    void SkipToNextClause() {
104
10.7k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)4.11k
)
105
3.98k
        ++this->I;
106
6.78k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::SkipToNextClause()
Line
Count
Source
103
208
    void SkipToNextClause() {
104
255
      while (this->I != End && 
!isa<SpecificClause>(*this->I)51
)
105
47
        ++this->I;
106
208
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::SkipToNextClause()
Line
Count
Source
103
6.44k
    void SkipToNextClause() {
104
10.7k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)4.46k
)
105
4.30k
        ++this->I;
106
6.44k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::SkipToNextClause()
Line
Count
Source
103
23
    void SkipToNextClause() {
104
25
      while (this->I != End && 
!isa<SpecificClause>(*this->I)7
)
105
2
        ++this->I;
106
23
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::SkipToNextClause()
Line
Count
Source
103
18
    void SkipToNextClause() {
104
18
      while (this->I != End && 
!isa<SpecificClause>(*this->I)3
)
105
0
        ++this->I;
106
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::SkipToNextClause()
Line
Count
Source
103
78
    void SkipToNextClause() {
104
138
      while (this->I != End && 
!isa<SpecificClause>(*this->I)64
)
105
60
        ++this->I;
106
78
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::SkipToNextClause()
Line
Count
Source
103
78
    void SkipToNextClause() {
104
140
      while (this->I != End && 
!isa<SpecificClause>(*this->I)66
)
105
62
        ++this->I;
106
78
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::SkipToNextClause()
Line
Count
Source
103
80
    void SkipToNextClause() {
104
144
      while (this->I != End && 
!isa<SpecificClause>(*this->I)66
)
105
64
        ++this->I;
106
80
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::SkipToNextClause()
Line
Count
Source
103
36
    void SkipToNextClause() {
104
50
      while (this->I != End && 
!isa<SpecificClause>(*this->I)18
)
105
14
        ++this->I;
106
36
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::SkipToNextClause()
Line
Count
Source
103
18
    void SkipToNextClause() {
104
20
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8
)
105
2
        ++this->I;
106
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::SkipToNextClause()
Line
Count
Source
103
950
    void SkipToNextClause() {
104
1.55k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)665
)
105
602
        ++this->I;
106
950
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::SkipToNextClause()
Line
Count
Source
103
12
    void SkipToNextClause() {
104
14
      while (this->I != End && 
!isa<SpecificClause>(*this->I)4
)
105
2
        ++this->I;
106
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::SkipToNextClause()
Line
Count
Source
103
96
    void SkipToNextClause() {
104
118
      while (this->I != End && 
!isa<SpecificClause>(*this->I)26
)
105
22
        ++this->I;
106
96
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::SkipToNextClause()
Line
Count
Source
103
1.49k
    void SkipToNextClause() {
104
2.44k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)973
)
105
946
        ++this->I;
106
1.49k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::SkipToNextClause()
Line
Count
Source
103
42
    void SkipToNextClause() {
104
80
      while (this->I != End && 
!isa<SpecificClause>(*this->I)41
)
105
38
        ++this->I;
106
42
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::SkipToNextClause()
Line
Count
Source
103
42
    void SkipToNextClause() {
104
83
      while (this->I != End && 
!isa<SpecificClause>(*this->I)44
)
105
41
        ++this->I;
106
42
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::SkipToNextClause()
Line
Count
Source
103
36
    void SkipToNextClause() {
104
62
      while (this->I != End && 
!isa<SpecificClause>(*this->I)32
)
105
26
        ++this->I;
106
36
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::SkipToNextClause()
Line
Count
Source
103
24.7k
    void SkipToNextClause() {
104
34.2k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)10.3k
)
105
9.47k
        ++this->I;
106
24.7k
    }
107
108
  public:
109
    explicit specific_clause_iterator(ArrayRef<OMPClause *> Clauses)
110
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
111
105k
          End(Clauses.end()) {
112
105k
      SkipToNextClause();
113
105k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
15.6k
          End(Clauses.end()) {
112
15.6k
      SkipToNextClause();
113
15.6k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.71k
          End(Clauses.end()) {
112
1.71k
      SkipToNextClause();
113
1.71k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
5.31k
          End(Clauses.end()) {
112
5.31k
      SkipToNextClause();
113
5.31k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.37k
          End(Clauses.end()) {
112
1.37k
      SkipToNextClause();
113
1.37k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
3.46k
          End(Clauses.end()) {
112
3.46k
      SkipToNextClause();
113
3.46k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
2.04k
          End(Clauses.end()) {
112
2.04k
      SkipToNextClause();
113
2.04k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.94k
          End(Clauses.end()) {
112
1.94k
      SkipToNextClause();
113
1.94k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
3.55k
          End(Clauses.end()) {
112
3.55k
      SkipToNextClause();
113
3.55k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.92k
          End(Clauses.end()) {
112
1.92k
      SkipToNextClause();
113
1.92k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.80k
          End(Clauses.end()) {
112
1.80k
      SkipToNextClause();
113
1.80k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
34
          End(Clauses.end()) {
112
34
      SkipToNextClause();
113
34
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
34
          End(Clauses.end()) {
112
34
      SkipToNextClause();
113
34
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
42
          End(Clauses.end()) {
112
42
      SkipToNextClause();
113
42
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.39k
          End(Clauses.end()) {
112
1.39k
      SkipToNextClause();
113
1.39k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
10.3k
          End(Clauses.end()) {
112
10.3k
      SkipToNextClause();
113
10.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
6.85k
          End(Clauses.end()) {
112
6.85k
      SkipToNextClause();
113
6.85k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.33k
          End(Clauses.end()) {
112
1.33k
      SkipToNextClause();
113
1.33k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.68k
          End(Clauses.end()) {
112
1.68k
      SkipToNextClause();
113
1.68k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.61k
          End(Clauses.end()) {
112
1.61k
      SkipToNextClause();
113
1.61k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
2.75k
          End(Clauses.end()) {
112
2.75k
      SkipToNextClause();
113
2.75k
    }
Unexecuted instantiation: clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
6.66k
          End(Clauses.end()) {
112
6.66k
      SkipToNextClause();
113
6.66k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
204
          End(Clauses.end()) {
112
204
      SkipToNextClause();
113
204
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
6.28k
          End(Clauses.end()) {
112
6.28k
      SkipToNextClause();
113
6.28k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
18
          End(Clauses.end()) {
112
18
      SkipToNextClause();
113
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
18
          End(Clauses.end()) {
112
18
      SkipToNextClause();
113
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
78
          End(Clauses.end()) {
112
78
      SkipToNextClause();
113
78
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
78
          End(Clauses.end()) {
112
78
      SkipToNextClause();
113
78
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
78
          End(Clauses.end()) {
112
78
      SkipToNextClause();
113
78
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
36
          End(Clauses.end()) {
112
36
      SkipToNextClause();
113
36
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
12
          End(Clauses.end()) {
112
12
      SkipToNextClause();
113
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
950
          End(Clauses.end()) {
112
950
      SkipToNextClause();
113
950
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
12
          End(Clauses.end()) {
112
12
      SkipToNextClause();
113
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
96
          End(Clauses.end()) {
112
96
      SkipToNextClause();
113
96
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
1.49k
          End(Clauses.end()) {
112
1.49k
      SkipToNextClause();
113
1.49k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
42
          End(Clauses.end()) {
112
42
      SkipToNextClause();
113
42
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
42
          End(Clauses.end()) {
112
42
      SkipToNextClause();
113
42
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
36
          End(Clauses.end()) {
112
36
      SkipToNextClause();
113
36
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
111
24.7k
          End(Clauses.end()) {
112
24.7k
      SkipToNextClause();
113
24.7k
    }
114
115
4.64k
    const SpecificClause *operator*() const {
116
4.64k
      return cast<SpecificClause>(*this->I);
117
4.64k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::operator*() const
Line
Count
Source
115
126
    const SpecificClause *operator*() const {
116
126
      return cast<SpecificClause>(*this->I);
117
126
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::operator*() const
Line
Count
Source
115
1.19k
    const SpecificClause *operator*() const {
116
1.19k
      return cast<SpecificClause>(*this->I);
117
1.19k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::operator*() const
Line
Count
Source
115
5
    const SpecificClause *operator*() const {
116
5
      return cast<SpecificClause>(*this->I);
117
5
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::operator*() const
Line
Count
Source
115
796
    const SpecificClause *operator*() const {
116
796
      return cast<SpecificClause>(*this->I);
117
796
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::operator*() const
Line
Count
Source
115
63
    const SpecificClause *operator*() const {
116
63
      return cast<SpecificClause>(*this->I);
117
63
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::operator*() const
Line
Count
Source
115
67
    const SpecificClause *operator*() const {
116
67
      return cast<SpecificClause>(*this->I);
117
67
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::operator*() const
Line
Count
Source
115
223
    const SpecificClause *operator*() const {
116
223
      return cast<SpecificClause>(*this->I);
117
223
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::operator*() const
Line
Count
Source
115
30
    const SpecificClause *operator*() const {
116
30
      return cast<SpecificClause>(*this->I);
117
30
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::operator*() const
Line
Count
Source
115
3
    const SpecificClause *operator*() const {
116
3
      return cast<SpecificClause>(*this->I);
117
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::operator*() const
Line
Count
Source
115
4
    const SpecificClause *operator*() const {
116
4
      return cast<SpecificClause>(*this->I);
117
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::operator*() const
Line
Count
Source
115
8
    const SpecificClause *operator*() const {
116
8
      return cast<SpecificClause>(*this->I);
117
8
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::operator*() const
Line
Count
Source
115
222
    const SpecificClause *operator*() const {
116
222
      return cast<SpecificClause>(*this->I);
117
222
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::operator*() const
Line
Count
Source
115
284
    const SpecificClause *operator*() const {
116
284
      return cast<SpecificClause>(*this->I);
117
284
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::operator*() const
Line
Count
Source
115
128
    const SpecificClause *operator*() const {
116
128
      return cast<SpecificClause>(*this->I);
117
128
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::operator*() const
Line
Count
Source
115
15
    const SpecificClause *operator*() const {
116
15
      return cast<SpecificClause>(*this->I);
117
15
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::operator*() const
Line
Count
Source
115
50
    const SpecificClause *operator*() const {
116
50
      return cast<SpecificClause>(*this->I);
117
50
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::operator*() const
Line
Count
Source
115
27
    const SpecificClause *operator*() const {
116
27
      return cast<SpecificClause>(*this->I);
117
27
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::operator*() const
Line
Count
Source
115
44
    const SpecificClause *operator*() const {
116
44
      return cast<SpecificClause>(*this->I);
117
44
    }
Unexecuted instantiation: clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::operator*() const
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::operator*() const
Line
Count
Source
115
121
    const SpecificClause *operator*() const {
116
121
      return cast<SpecificClause>(*this->I);
117
121
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::operator*() const
Line
Count
Source
115
4
    const SpecificClause *operator*() const {
116
4
      return cast<SpecificClause>(*this->I);
117
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::operator*() const
Line
Count
Source
115
7
    const SpecificClause *operator*() const {
116
7
      return cast<SpecificClause>(*this->I);
117
7
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::operator*() const
Line
Count
Source
115
154
    const SpecificClause *operator*() const {
116
154
      return cast<SpecificClause>(*this->I);
117
154
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::operator*() const
Line
Count
Source
115
5
    const SpecificClause *operator*() const {
116
5
      return cast<SpecificClause>(*this->I);
117
5
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::operator*() const
Line
Count
Source
115
3
    const SpecificClause *operator*() const {
116
3
      return cast<SpecificClause>(*this->I);
117
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::operator*() const
Line
Count
Source
115
4
    const SpecificClause *operator*() const {
116
4
      return cast<SpecificClause>(*this->I);
117
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::operator*() const
Line
Count
Source
115
4
    const SpecificClause *operator*() const {
116
4
      return cast<SpecificClause>(*this->I);
117
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::operator*() const
Line
Count
Source
115
62
    const SpecificClause *operator*() const {
116
62
      return cast<SpecificClause>(*this->I);
117
62
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::operator*() const
Line
Count
Source
115
2
    const SpecificClause *operator*() const {
116
2
      return cast<SpecificClause>(*this->I);
117
2
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::operator*() const
Line
Count
Source
115
4
    const SpecificClause *operator*() const {
116
4
      return cast<SpecificClause>(*this->I);
117
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::operator*() const
Line
Count
Source
115
6
    const SpecificClause *operator*() const {
116
6
      return cast<SpecificClause>(*this->I);
117
6
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::operator*() const
Line
Count
Source
115
63
    const SpecificClause *operator*() const {
116
63
      return cast<SpecificClause>(*this->I);
117
63
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::operator*() const
Line
Count
Source
115
2
    const SpecificClause *operator*() const {
116
2
      return cast<SpecificClause>(*this->I);
117
2
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::operator*() const
Line
Count
Source
115
4
    const SpecificClause *operator*() const {
116
4
      return cast<SpecificClause>(*this->I);
117
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::operator*() const
Line
Count
Source
115
27
    const SpecificClause *operator*() const {
116
27
      return cast<SpecificClause>(*this->I);
117
27
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::operator*() const
Line
Count
Source
115
3
    const SpecificClause *operator*() const {
116
3
      return cast<SpecificClause>(*this->I);
117
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::operator*() const
Line
Count
Source
115
3
    const SpecificClause *operator*() const {
116
3
      return cast<SpecificClause>(*this->I);
117
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::operator*() const
Line
Count
Source
115
6
    const SpecificClause *operator*() const {
116
6
      return cast<SpecificClause>(*this->I);
117
6
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::operator*() const
Line
Count
Source
115
877
    const SpecificClause *operator*() const {
116
877
      return cast<SpecificClause>(*this->I);
117
877
    }
118
    const SpecificClause *operator->() const { return **this; }
119
120
2.94k
    specific_clause_iterator &operator++() {
121
2.94k
      ++this->I;
122
2.94k
      SkipToNextClause();
123
2.94k
      return *this;
124
2.94k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::operator++()
Line
Count
Source
120
14
    specific_clause_iterator &operator++() {
121
14
      ++this->I;
122
14
      SkipToNextClause();
123
14
      return *this;
124
14
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::operator++()
Line
Count
Source
120
1.19k
    specific_clause_iterator &operator++() {
121
1.19k
      ++this->I;
122
1.19k
      SkipToNextClause();
123
1.19k
      return *this;
124
1.19k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::operator++()
Line
Count
Source
120
5
    specific_clause_iterator &operator++() {
121
5
      ++this->I;
122
5
      SkipToNextClause();
123
5
      return *this;
124
5
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::operator++()
Line
Count
Source
120
796
    specific_clause_iterator &operator++() {
121
796
      ++this->I;
122
796
      SkipToNextClause();
123
796
      return *this;
124
796
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::operator++()
Line
Count
Source
120
80
    specific_clause_iterator &operator++() {
121
80
      ++this->I;
122
80
      SkipToNextClause();
123
80
      return *this;
124
80
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::operator++()
Line
Count
Source
120
3
    specific_clause_iterator &operator++() {
121
3
      ++this->I;
122
3
      SkipToNextClause();
123
3
      return *this;
124
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::operator++()
Line
Count
Source
120
4
    specific_clause_iterator &operator++() {
121
4
      ++this->I;
122
4
      SkipToNextClause();
123
4
      return *this;
124
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::operator++()
Line
Count
Source
120
8
    specific_clause_iterator &operator++() {
121
8
      ++this->I;
122
8
      SkipToNextClause();
123
8
      return *this;
124
8
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::operator++()
Line
Count
Source
120
36
    specific_clause_iterator &operator++() {
121
36
      ++this->I;
122
36
      SkipToNextClause();
123
36
      return *this;
124
36
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::operator++()
Line
Count
Source
120
284
    specific_clause_iterator &operator++() {
121
284
      ++this->I;
122
284
      SkipToNextClause();
123
284
      return *this;
124
284
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::operator++()
Line
Count
Source
120
128
    specific_clause_iterator &operator++() {
121
128
      ++this->I;
122
128
      SkipToNextClause();
123
128
      return *this;
124
128
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::operator++()
Line
Count
Source
120
44
    specific_clause_iterator &operator++() {
121
44
      ++this->I;
122
44
      SkipToNextClause();
123
44
      return *this;
124
44
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::operator++()
Line
Count
Source
120
121
    specific_clause_iterator &operator++() {
121
121
      ++this->I;
122
121
      SkipToNextClause();
123
121
      return *this;
124
121
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::operator++()
Line
Count
Source
120
4
    specific_clause_iterator &operator++() {
121
4
      ++this->I;
122
4
      SkipToNextClause();
123
4
      return *this;
124
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::operator++()
Line
Count
Source
120
154
    specific_clause_iterator &operator++() {
121
154
      ++this->I;
122
154
      SkipToNextClause();
123
154
      return *this;
124
154
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::operator++()
Line
Count
Source
120
5
    specific_clause_iterator &operator++() {
121
5
      ++this->I;
122
5
      SkipToNextClause();
123
5
      return *this;
124
5
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::operator++()
Line
Count
Source
120
62
    specific_clause_iterator &operator++() {
121
62
      ++this->I;
122
62
      SkipToNextClause();
123
62
      return *this;
124
62
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::operator++()
Line
Count
Source
120
2
    specific_clause_iterator &operator++() {
121
2
      ++this->I;
122
2
      SkipToNextClause();
123
2
      return *this;
124
2
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::operator++()
Line
Count
Source
120
6
    specific_clause_iterator &operator++() {
121
6
      ++this->I;
122
6
      SkipToNextClause();
123
6
      return *this;
124
6
    }
125
  };
126
127
  template <typename SpecificClause>
128
  static llvm::iterator_range<specific_clause_iterator<SpecificClause>>
129
52.9k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
52.9k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
52.9k
            specific_clause_iterator<SpecificClause>(
132
52.9k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
52.9k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
7.84k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
7.84k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
7.84k
            specific_clause_iterator<SpecificClause>(
132
7.84k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
7.84k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDependClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
857
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
857
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
857
            specific_clause_iterator<SpecificClause>(
132
857
                llvm::makeArrayRef(Clauses.end(), 0))};
133
857
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFirstprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
2.65k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
2.65k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
2.65k
            specific_clause_iterator<SpecificClause>(
132
2.65k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
2.65k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIsDevicePtrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
688
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
688
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
688
            specific_clause_iterator<SpecificClause>(
132
688
                llvm::makeArrayRef(Clauses.end(), 0))};
133
688
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPMapClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
1.73k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
1.73k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
1.73k
            specific_clause_iterator<SpecificClause>(
132
1.73k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
1.73k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTeamsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
1.02k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
1.02k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
1.02k
            specific_clause_iterator<SpecificClause>(
132
1.02k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
1.02k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPThreadLimitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
971
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
971
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
971
            specific_clause_iterator<SpecificClause>(
132
971
                llvm::makeArrayRef(Clauses.end(), 0))};
133
971
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIfClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
1.77k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
1.77k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
1.77k
            specific_clause_iterator<SpecificClause>(
132
1.77k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
1.77k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumThreadsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
960
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
960
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
960
            specific_clause_iterator<SpecificClause>(
132
960
                llvm::makeArrayRef(Clauses.end(), 0))};
133
960
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNowaitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
903
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
903
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
903
            specific_clause_iterator<SpecificClause>(
132
903
                llvm::makeArrayRef(Clauses.end(), 0))};
133
903
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPToClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
17
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
17
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
17
            specific_clause_iterator<SpecificClause>(
132
17
                llvm::makeArrayRef(Clauses.end(), 0))};
133
17
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFromClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
17
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
17
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
17
            specific_clause_iterator<SpecificClause>(
132
17
                llvm::makeArrayRef(Clauses.end(), 0))};
133
17
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDevicePtrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
21
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
21
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
21
            specific_clause_iterator<SpecificClause>(
132
21
                llvm::makeArrayRef(Clauses.end(), 0))};
133
21
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
699
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
699
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
699
            specific_clause_iterator<SpecificClause>(
132
699
                llvm::makeArrayRef(Clauses.end(), 0))};
133
699
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
5.16k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
5.16k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
5.16k
            specific_clause_iterator<SpecificClause>(
132
5.16k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
5.16k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLastprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
3.42k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
3.42k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
3.42k
            specific_clause_iterator<SpecificClause>(
132
3.42k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
3.42k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPProcBindClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
665
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
665
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
665
            specific_clause_iterator<SpecificClause>(
132
665
                llvm::makeArrayRef(Clauses.end(), 0))};
133
665
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSimdlenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
841
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
841
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
841
            specific_clause_iterator<SpecificClause>(
132
841
                llvm::makeArrayRef(Clauses.end(), 0))};
133
841
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSafelenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
807
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
807
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
807
            specific_clause_iterator<SpecificClause>(
132
807
                llvm::makeArrayRef(Clauses.end(), 0))};
133
807
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAlignedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
1.37k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
1.37k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
1.37k
            specific_clause_iterator<SpecificClause>(
132
1.37k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
1.37k
  }
Unexecuted instantiation: llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFlushClause>(llvm::ArrayRef<clang::OMPClause*>)
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPrivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
3.33k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
3.33k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
3.33k
            specific_clause_iterator<SpecificClause>(
132
3.33k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
3.33k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyinClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
102
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
102
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
102
            specific_clause_iterator<SpecificClause>(
132
102
                llvm::makeArrayRef(Clauses.end(), 0))};
133
102
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLinearClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
3.14k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
3.14k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
3.14k
            specific_clause_iterator<SpecificClause>(
132
3.14k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
3.14k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
9
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
9
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
9
            specific_clause_iterator<SpecificClause>(
132
9
                llvm::makeArrayRef(Clauses.end(), 0))};
133
9
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPHintClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
9
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
9
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
9
            specific_clause_iterator<SpecificClause>(
132
9
                llvm::makeArrayRef(Clauses.end(), 0))};
133
9
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFinalClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
39
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
39
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
39
            specific_clause_iterator<SpecificClause>(
132
39
                llvm::makeArrayRef(Clauses.end(), 0))};
133
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPriorityClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
39
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
39
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
39
            specific_clause_iterator<SpecificClause>(
132
39
                llvm::makeArrayRef(Clauses.end(), 0))};
133
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
39
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
39
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
39
            specific_clause_iterator<SpecificClause>(
132
39
                llvm::makeArrayRef(Clauses.end(), 0))};
133
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUntiedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
18
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
18
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
18
            specific_clause_iterator<SpecificClause>(
132
18
                llvm::makeArrayRef(Clauses.end(), 0))};
133
18
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPTaskReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
6
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
6
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
6
            specific_clause_iterator<SpecificClause>(
132
6
                llvm::makeArrayRef(Clauses.end(), 0))};
133
6
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDistScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
475
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
475
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
475
            specific_clause_iterator<SpecificClause>(
132
475
                llvm::makeArrayRef(Clauses.end(), 0))};
133
475
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSIMDClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
6
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
6
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
6
            specific_clause_iterator<SpecificClause>(
132
6
                llvm::makeArrayRef(Clauses.end(), 0))};
133
6
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSeqCstClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
48
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
48
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
48
            specific_clause_iterator<SpecificClause>(
132
48
                llvm::makeArrayRef(Clauses.end(), 0))};
133
48
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDeviceClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
747
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
747
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
747
            specific_clause_iterator<SpecificClause>(
132
747
                llvm::makeArrayRef(Clauses.end(), 0))};
133
747
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNogroupClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
21
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
21
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
21
            specific_clause_iterator<SpecificClause>(
132
21
                llvm::makeArrayRef(Clauses.end(), 0))};
133
21
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPGrainsizeClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
21
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
21
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
21
            specific_clause_iterator<SpecificClause>(
132
21
                llvm::makeArrayRef(Clauses.end(), 0))};
133
21
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTasksClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
18
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
18
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
18
            specific_clause_iterator<SpecificClause>(
132
18
                llvm::makeArrayRef(Clauses.end(), 0))};
133
18
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCollapseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
129
12.3k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
130
12.3k
    return {specific_clause_iterator<SpecificClause>(Clauses),
131
12.3k
            specific_clause_iterator<SpecificClause>(
132
12.3k
                llvm::makeArrayRef(Clauses.end(), 0))};
133
12.3k
  }
134
135
  template <typename SpecificClause>
136
  llvm::iterator_range<specific_clause_iterator<SpecificClause>>
137
35.6k
  getClausesOfKind() const {
138
35.6k
    return getClausesOfKind<SpecificClause>(clauses());
139
35.6k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderedClause>() const
Line
Count
Source
137
2.92k
  getClausesOfKind() const {
138
2.92k
    return getClausesOfKind<SpecificClause>(clauses());
139
2.92k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDependClause>() const
Line
Count
Source
137
857
  getClausesOfKind() const {
138
857
    return getClausesOfKind<SpecificClause>(clauses());
139
857
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFirstprivateClause>() const
Line
Count
Source
137
2.65k
  getClausesOfKind() const {
138
2.65k
    return getClausesOfKind<SpecificClause>(clauses());
139
2.65k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIsDevicePtrClause>() const
Line
Count
Source
137
688
  getClausesOfKind() const {
138
688
    return getClausesOfKind<SpecificClause>(clauses());
139
688
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPMapClause>() const
Line
Count
Source
137
1.73k
  getClausesOfKind() const {
138
1.73k
    return getClausesOfKind<SpecificClause>(clauses());
139
1.73k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTeamsClause>() const
Line
Count
Source
137
1.02k
  getClausesOfKind() const {
138
1.02k
    return getClausesOfKind<SpecificClause>(clauses());
139
1.02k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPThreadLimitClause>() const
Line
Count
Source
137
971
  getClausesOfKind() const {
138
971
    return getClausesOfKind<SpecificClause>(clauses());
139
971
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIfClause>() const
Line
Count
Source
137
1.77k
  getClausesOfKind() const {
138
1.77k
    return getClausesOfKind<SpecificClause>(clauses());
139
1.77k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumThreadsClause>() const
Line
Count
Source
137
960
  getClausesOfKind() const {
138
960
    return getClausesOfKind<SpecificClause>(clauses());
139
960
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNowaitClause>() const
Line
Count
Source
137
903
  getClausesOfKind() const {
138
903
    return getClausesOfKind<SpecificClause>(clauses());
139
903
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPToClause>() const
Line
Count
Source
137
17
  getClausesOfKind() const {
138
17
    return getClausesOfKind<SpecificClause>(clauses());
139
17
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFromClause>() const
Line
Count
Source
137
17
  getClausesOfKind() const {
138
17
    return getClausesOfKind<SpecificClause>(clauses());
139
17
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDevicePtrClause>() const
Line
Count
Source
137
21
  getClausesOfKind() const {
138
21
    return getClausesOfKind<SpecificClause>(clauses());
139
21
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPScheduleClause>() const
Line
Count
Source
137
699
  getClausesOfKind() const {
138
699
    return getClausesOfKind<SpecificClause>(clauses());
139
699
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReductionClause>() const
Line
Count
Source
137
5.16k
  getClausesOfKind() const {
138
5.16k
    return getClausesOfKind<SpecificClause>(clauses());
139
5.16k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLastprivateClause>() const
Line
Count
Source
137
3.42k
  getClausesOfKind() const {
138
3.42k
    return getClausesOfKind<SpecificClause>(clauses());
139
3.42k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPProcBindClause>() const
Line
Count
Source
137
665
  getClausesOfKind() const {
138
665
    return getClausesOfKind<SpecificClause>(clauses());
139
665
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSimdlenClause>() const
Line
Count
Source
137
841
  getClausesOfKind() const {
138
841
    return getClausesOfKind<SpecificClause>(clauses());
139
841
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSafelenClause>() const
Line
Count
Source
137
807
  getClausesOfKind() const {
138
807
    return getClausesOfKind<SpecificClause>(clauses());
139
807
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAlignedClause>() const
Line
Count
Source
137
1.37k
  getClausesOfKind() const {
138
1.37k
    return getClausesOfKind<SpecificClause>(clauses());
139
1.37k
  }
Unexecuted instantiation: llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFlushClause>() const
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPrivateClause>() const
Line
Count
Source
137
3.33k
  getClausesOfKind() const {
138
3.33k
    return getClausesOfKind<SpecificClause>(clauses());
139
3.33k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyinClause>() const
Line
Count
Source
137
102
  getClausesOfKind() const {
138
102
    return getClausesOfKind<SpecificClause>(clauses());
139
102
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLinearClause>() const
Line
Count
Source
137
3.14k
  getClausesOfKind() const {
138
3.14k
    return getClausesOfKind<SpecificClause>(clauses());
139
3.14k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyprivateClause>() const
Line
Count
Source
137
9
  getClausesOfKind() const {
138
9
    return getClausesOfKind<SpecificClause>(clauses());
139
9
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPHintClause>() const
Line
Count
Source
137
9
  getClausesOfKind() const {
138
9
    return getClausesOfKind<SpecificClause>(clauses());
139
9
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFinalClause>() const
Line
Count
Source
137
39
  getClausesOfKind() const {
138
39
    return getClausesOfKind<SpecificClause>(clauses());
139
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPriorityClause>() const
Line
Count
Source
137
39
  getClausesOfKind() const {
138
39
    return getClausesOfKind<SpecificClause>(clauses());
139
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInReductionClause>() const
Line
Count
Source
137
39
  getClausesOfKind() const {
138
39
    return getClausesOfKind<SpecificClause>(clauses());
139
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUntiedClause>() const
Line
Count
Source
137
18
  getClausesOfKind() const {
138
18
    return getClausesOfKind<SpecificClause>(clauses());
139
18
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPTaskReductionClause>() const
Line
Count
Source
137
6
  getClausesOfKind() const {
138
6
    return getClausesOfKind<SpecificClause>(clauses());
139
6
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDistScheduleClause>() const
Line
Count
Source
137
475
  getClausesOfKind() const {
138
475
    return getClausesOfKind<SpecificClause>(clauses());
139
475
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSIMDClause>() const
Line
Count
Source
137
6
  getClausesOfKind() const {
138
6
    return getClausesOfKind<SpecificClause>(clauses());
139
6
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSeqCstClause>() const
Line
Count
Source
137
48
  getClausesOfKind() const {
138
48
    return getClausesOfKind<SpecificClause>(clauses());
139
48
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDeviceClause>() const
Line
Count
Source
137
747
  getClausesOfKind() const {
138
747
    return getClausesOfKind<SpecificClause>(clauses());
139
747
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNogroupClause>() const
Line
Count
Source
137
21
  getClausesOfKind() const {
138
21
    return getClausesOfKind<SpecificClause>(clauses());
139
21
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPGrainsizeClause>() const
Line
Count
Source
137
21
  getClausesOfKind() const {
138
21
    return getClausesOfKind<SpecificClause>(clauses());
139
21
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTasksClause>() const
Line
Count
Source
137
18
  getClausesOfKind() const {
138
18
    return getClausesOfKind<SpecificClause>(clauses());
139
18
  }
140
141
  /// Gets a single clause of the specified kind associated with the
142
  /// current directive iff there is only one clause of this kind (and assertion
143
  /// is fired if there is more than one clause is associated with the
144
  /// directive). Returns nullptr if no clause of this kind is associated with
145
  /// the directive.
146
  template <typename SpecificClause>
147
6.96k
  const SpecificClause *getSingleClause() const {
148
6.96k
    auto Clauses = getClausesOfKind<SpecificClause>();
149
6.96k
150
6.96k
    if (Clauses.begin() != Clauses.end()) {
151
561
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
561
             "There are at least 2 clauses of the specified kind");
153
561
      return *Clauses.begin();
154
561
    }
155
6.40k
    return nullptr;
156
6.40k
  }
clang::OMPNumTeamsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTeamsClause>() const
Line
Count
Source
147
612
  const SpecificClause *getSingleClause() const {
148
612
    auto Clauses = getClausesOfKind<SpecificClause>();
149
612
150
612
    if (Clauses.begin() != Clauses.end()) {
151
63
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
63
             "There are at least 2 clauses of the specified kind");
153
63
      return *Clauses.begin();
154
63
    }
155
549
    return nullptr;
156
549
  }
clang::OMPThreadLimitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPThreadLimitClause>() const
Line
Count
Source
147
608
  const SpecificClause *getSingleClause() const {
148
608
    auto Clauses = getClausesOfKind<SpecificClause>();
149
608
150
608
    if (Clauses.begin() != Clauses.end()) {
151
67
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
67
             "There are at least 2 clauses of the specified kind");
153
67
      return *Clauses.begin();
154
67
    }
155
541
    return nullptr;
156
541
  }
clang::OMPNumThreadsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumThreadsClause>() const
Line
Count
Source
147
677
  const SpecificClause *getSingleClause() const {
148
677
    auto Clauses = getClausesOfKind<SpecificClause>();
149
677
150
677
    if (Clauses.begin() != Clauses.end()) {
151
30
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
30
             "There are at least 2 clauses of the specified kind");
153
30
      return *Clauses.begin();
154
30
    }
155
647
    return nullptr;
156
647
  }
clang::OMPProcBindClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPProcBindClause>() const
Line
Count
Source
147
665
  const SpecificClause *getSingleClause() const {
148
665
    auto Clauses = getClausesOfKind<SpecificClause>();
149
665
150
665
    if (Clauses.begin() != Clauses.end()) {
151
15
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
15
             "There are at least 2 clauses of the specified kind");
153
15
      return *Clauses.begin();
154
15
    }
155
650
    return nullptr;
156
650
  }
clang::OMPSimdlenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSimdlenClause>() const
Line
Count
Source
147
841
  const SpecificClause *getSingleClause() const {
148
841
    auto Clauses = getClausesOfKind<SpecificClause>();
149
841
150
841
    if (Clauses.begin() != Clauses.end()) {
151
50
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
50
             "There are at least 2 clauses of the specified kind");
153
50
      return *Clauses.begin();
154
50
    }
155
791
    return nullptr;
156
791
  }
clang::OMPSafelenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSafelenClause>() const
Line
Count
Source
147
807
  const SpecificClause *getSingleClause() const {
148
807
    auto Clauses = getClausesOfKind<SpecificClause>();
149
807
150
807
    if (Clauses.begin() != Clauses.end()) {
151
27
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
27
             "There are at least 2 clauses of the specified kind");
153
27
      return *Clauses.begin();
154
27
    }
155
780
    return nullptr;
156
780
  }
Unexecuted instantiation: clang::OMPFlushClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFlushClause>() const
clang::OMPNowaitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNowaitClause>() const
Line
Count
Source
147
171
  const SpecificClause *getSingleClause() const {
148
171
    auto Clauses = getClausesOfKind<SpecificClause>();
149
171
150
171
    if (Clauses.begin() != Clauses.end()) {
151
7
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
7
             "There are at least 2 clauses of the specified kind");
153
7
      return *Clauses.begin();
154
7
    }
155
164
    return nullptr;
156
164
  }
clang::OMPOrderedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPOrderedClause>() const
Line
Count
Source
147
562
  const SpecificClause *getSingleClause() const {
148
562
    auto Clauses = getClausesOfKind<SpecificClause>();
149
562
150
562
    if (Clauses.begin() != Clauses.end()) {
151
7
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
7
             "There are at least 2 clauses of the specified kind");
153
7
      return *Clauses.begin();
154
7
    }
155
555
    return nullptr;
156
555
  }
clang::OMPScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPScheduleClause>() const
Line
Count
Source
147
562
  const SpecificClause *getSingleClause() const {
148
562
    auto Clauses = getClausesOfKind<SpecificClause>();
149
562
150
562
    if (Clauses.begin() != Clauses.end()) {
151
163
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
163
             "There are at least 2 clauses of the specified kind");
153
163
      return *Clauses.begin();
154
163
    }
155
399
    return nullptr;
156
399
  }
clang::OMPHintClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPHintClause>() const
Line
Count
Source
147
9
  const SpecificClause *getSingleClause() const {
148
9
    auto Clauses = getClausesOfKind<SpecificClause>();
149
9
150
9
    if (Clauses.begin() != Clauses.end()) {
151
3
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
3
             "There are at least 2 clauses of the specified kind");
153
3
      return *Clauses.begin();
154
3
    }
155
6
    return nullptr;
156
6
  }
clang::OMPFinalClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFinalClause>() const
Line
Count
Source
147
39
  const SpecificClause *getSingleClause() const {
148
39
    auto Clauses = getClausesOfKind<SpecificClause>();
149
39
150
39
    if (Clauses.begin() != Clauses.end()) {
151
4
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
4
             "There are at least 2 clauses of the specified kind");
153
4
      return *Clauses.begin();
154
4
    }
155
35
    return nullptr;
156
35
  }
clang::OMPPriorityClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPPriorityClause>() const
Line
Count
Source
147
39
  const SpecificClause *getSingleClause() const {
148
39
    auto Clauses = getClausesOfKind<SpecificClause>();
149
39
150
39
    if (Clauses.begin() != Clauses.end()) {
151
4
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
4
             "There are at least 2 clauses of the specified kind");
153
4
      return *Clauses.begin();
154
4
    }
155
35
    return nullptr;
156
35
  }
clang::OMPUntiedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUntiedClause>() const
Line
Count
Source
147
18
  const SpecificClause *getSingleClause() const {
148
18
    auto Clauses = getClausesOfKind<SpecificClause>();
149
18
150
18
    if (Clauses.begin() != Clauses.end()) {
151
4
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
4
             "There are at least 2 clauses of the specified kind");
153
4
      return *Clauses.begin();
154
4
    }
155
14
    return nullptr;
156
14
  }
clang::OMPDistScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDistScheduleClause>() const
Line
Count
Source
147
475
  const SpecificClause *getSingleClause() const {
148
475
    auto Clauses = getClausesOfKind<SpecificClause>();
149
475
150
475
    if (Clauses.begin() != Clauses.end()) {
151
63
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
63
             "There are at least 2 clauses of the specified kind");
153
63
      return *Clauses.begin();
154
63
    }
155
412
    return nullptr;
156
412
  }
clang::OMPSIMDClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSIMDClause>() const
Line
Count
Source
147
6
  const SpecificClause *getSingleClause() const {
148
6
    auto Clauses = getClausesOfKind<SpecificClause>();
149
6
150
6
    if (Clauses.begin() != Clauses.end()) {
151
2
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
2
             "There are at least 2 clauses of the specified kind");
153
2
      return *Clauses.begin();
154
2
    }
155
4
    return nullptr;
156
4
  }
clang::OMPSeqCstClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSeqCstClause>() const
Line
Count
Source
147
48
  const SpecificClause *getSingleClause() const {
148
48
    auto Clauses = getClausesOfKind<SpecificClause>();
149
48
150
48
    if (Clauses.begin() != Clauses.end()) {
151
4
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
4
             "There are at least 2 clauses of the specified kind");
153
4
      return *Clauses.begin();
154
4
    }
155
44
    return nullptr;
156
44
  }
clang::OMPDeviceClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDeviceClause>() const
Line
Count
Source
147
747
  const SpecificClause *getSingleClause() const {
148
747
    auto Clauses = getClausesOfKind<SpecificClause>();
149
747
150
747
    if (Clauses.begin() != Clauses.end()) {
151
27
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
27
             "There are at least 2 clauses of the specified kind");
153
27
      return *Clauses.begin();
154
27
    }
155
720
    return nullptr;
156
720
  }
clang::OMPIfClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPIfClause>() const
Line
Count
Source
147
19
  const SpecificClause *getSingleClause() const {
148
19
    auto Clauses = getClausesOfKind<SpecificClause>();
149
19
150
19
    if (Clauses.begin() != Clauses.end()) {
151
9
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
9
             "There are at least 2 clauses of the specified kind");
153
9
      return *Clauses.begin();
154
9
    }
155
10
    return nullptr;
156
10
  }
clang::OMPNogroupClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNogroupClause>() const
Line
Count
Source
147
21
  const SpecificClause *getSingleClause() const {
148
21
    auto Clauses = getClausesOfKind<SpecificClause>();
149
21
150
21
    if (Clauses.begin() != Clauses.end()) {
151
3
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
3
             "There are at least 2 clauses of the specified kind");
153
3
      return *Clauses.begin();
154
3
    }
155
18
    return nullptr;
156
18
  }
clang::OMPGrainsizeClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPGrainsizeClause>() const
Line
Count
Source
147
21
  const SpecificClause *getSingleClause() const {
148
21
    auto Clauses = getClausesOfKind<SpecificClause>();
149
21
150
21
    if (Clauses.begin() != Clauses.end()) {
151
3
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
3
             "There are at least 2 clauses of the specified kind");
153
3
      return *Clauses.begin();
154
3
    }
155
18
    return nullptr;
156
18
  }
clang::OMPNumTasksClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTasksClause>() const
Line
Count
Source
147
18
  const SpecificClause *getSingleClause() const {
148
18
    auto Clauses = getClausesOfKind<SpecificClause>();
149
18
150
18
    if (Clauses.begin() != Clauses.end()) {
151
6
      assert(std::next(Clauses.begin()) == Clauses.end() &&
152
6
             "There are at least 2 clauses of the specified kind");
153
6
      return *Clauses.begin();
154
6
    }
155
12
    return nullptr;
156
12
  }
157
158
  /// Returns true if the current directive has one or more clauses of a
159
  /// specific kind.
160
  template <typename SpecificClause>
161
3.00k
  bool hasClausesOfKind() const {
162
3.00k
    auto Clauses = getClausesOfKind<SpecificClause>();
163
3.00k
    return Clauses.begin() != Clauses.end();
164
3.00k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPDependClause>() const
Line
Count
Source
161
770
  bool hasClausesOfKind() const {
162
770
    auto Clauses = getClausesOfKind<SpecificClause>();
163
770
    return Clauses.begin() != Clauses.end();
164
770
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNumTeamsClause>() const
Line
Count
Source
161
411
  bool hasClausesOfKind() const {
162
411
    auto Clauses = getClausesOfKind<SpecificClause>();
163
411
    return Clauses.begin() != Clauses.end();
164
411
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPThreadLimitClause>() const
Line
Count
Source
161
363
  bool hasClausesOfKind() const {
162
363
    auto Clauses = getClausesOfKind<SpecificClause>();
163
363
    return Clauses.begin() != Clauses.end();
164
363
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPIfClause>() const
Line
Count
Source
161
285
  bool hasClausesOfKind() const {
162
285
    auto Clauses = getClausesOfKind<SpecificClause>();
163
285
    return Clauses.begin() != Clauses.end();
164
285
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNumThreadsClause>() const
Line
Count
Source
161
283
  bool hasClausesOfKind() const {
162
283
    auto Clauses = getClausesOfKind<SpecificClause>();
163
283
    return Clauses.begin() != Clauses.end();
164
283
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNowaitClause>() const
Line
Count
Source
161
732
  bool hasClausesOfKind() const {
162
732
    auto Clauses = getClausesOfKind<SpecificClause>();
163
732
    return Clauses.begin() != Clauses.end();
164
732
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPOrderedClause>() const
Line
Count
Source
161
79
  bool hasClausesOfKind() const {
162
79
    auto Clauses = getClausesOfKind<SpecificClause>();
163
79
    return Clauses.begin() != Clauses.end();
164
79
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPScheduleClause>() const
Line
Count
Source
161
78
  bool hasClausesOfKind() const {
162
78
    auto Clauses = getClausesOfKind<SpecificClause>();
163
78
    return Clauses.begin() != Clauses.end();
164
78
  }
165
166
  /// Returns starting location of directive kind.
167
33.1k
  SourceLocation getBeginLoc() const { return StartLoc; }
168
  /// Returns ending location of directive.
169
15.7k
  SourceLocation getEndLoc() const { return EndLoc; }
170
171
  /// Set starting location of directive kind.
172
  ///
173
  /// \param Loc New starting location of directive.
174
  ///
175
1.57k
  void setLocStart(SourceLocation Loc) { StartLoc = Loc; }
176
  /// Set ending location of directive.
177
  ///
178
  /// \param Loc New ending location of directive.
179
  ///
180
1.57k
  void setLocEnd(SourceLocation Loc) { EndLoc = Loc; }
181
182
  /// Get number of clauses.
183
9.03k
  unsigned getNumClauses() const { return NumClauses; }
184
185
  /// Returns specified clause.
186
  ///
187
  /// \param i Number of clause.
188
  ///
189
2.10k
  OMPClause *getClause(unsigned i) const { return clauses()[i]; }
190
191
  /// Returns true if directive has associated statement.
192
520k
  bool hasAssociatedStmt() const { return NumChildren > 0; }
193
194
  /// Returns statement associated with the directive.
195
33.1k
  const Stmt *getAssociatedStmt() const {
196
33.1k
    assert(hasAssociatedStmt() && "no associated statement.");
197
33.1k
    return *child_begin();
198
33.1k
  }
199
61.5k
  Stmt *getAssociatedStmt() {
200
61.5k
    assert(hasAssociatedStmt() && "no associated statement.");
201
61.5k
    return *child_begin();
202
61.5k
  }
203
204
  /// Returns the captured statement associated with the
205
  /// component region within the (combined) directive.
206
  //
207
  // \param RegionKind Component region kind.
208
6.65k
  const CapturedStmt *getCapturedStmt(OpenMPDirectiveKind RegionKind) const {
209
6.65k
    SmallVector<OpenMPDirectiveKind, 4> CaptureRegions;
210
6.65k
    getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind());
211
6.65k
    assert(std::any_of(
212
6.65k
               CaptureRegions.begin(), CaptureRegions.end(),
213
6.65k
               [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) &&
214
6.65k
           "RegionKind not found in OpenMP CaptureRegions.");
215
6.65k
    auto *CS = cast<CapturedStmt>(getAssociatedStmt());
216
12.9k
    for (auto ThisCaptureRegion : CaptureRegions) {
217
12.9k
      if (ThisCaptureRegion == RegionKind)
218
6.65k
        return CS;
219
6.25k
      CS = cast<CapturedStmt>(CS->getCapturedStmt());
220
6.25k
    }
221
6.65k
    
llvm_unreachable0
("Incorrect RegionKind specified for directive.");
222
6.65k
  }
223
224
  /// Get innermost captured statement for the construct.
225
44.1k
  CapturedStmt *getInnermostCapturedStmt() {
226
44.1k
    assert(hasAssociatedStmt() && getAssociatedStmt() &&
227
44.1k
           "Must have associated statement.");
228
44.1k
    SmallVector<OpenMPDirectiveKind, 4> CaptureRegions;
229
44.1k
    getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind());
230
44.1k
    assert(!CaptureRegions.empty() &&
231
44.1k
           "At least one captured statement must be provided.");
232
44.1k
    auto *CS = cast<CapturedStmt>(getAssociatedStmt());
233
78.1k
    for (unsigned Level = CaptureRegions.size(); Level > 1; 
--Level34.0k
)
234
34.0k
      CS = cast<CapturedStmt>(CS->getCapturedStmt());
235
44.1k
    return CS;
236
44.1k
  }
237
238
27.5k
  const CapturedStmt *getInnermostCapturedStmt() const {
239
27.5k
    return const_cast<OMPExecutableDirective *>(this)
240
27.5k
        ->getInnermostCapturedStmt();
241
27.5k
  }
242
243
205k
  OpenMPDirectiveKind getDirectiveKind() const { return Kind; }
244
245
56.4k
  static bool classof(const Stmt *S) {
246
56.4k
    return S->getStmtClass() >= firstOMPExecutableDirectiveConstant &&
247
56.4k
           
S->getStmtClass() <= lastOMPExecutableDirectiveConstant52.4k
;
248
56.4k
  }
249
250
475k
  child_range children() {
251
475k
    if (!hasAssociatedStmt())
252
51
      return child_range(child_iterator(), child_iterator());
253
475k
    Stmt **ChildStorage = reinterpret_cast<Stmt **>(getClauses().end());
254
475k
    /// Do not mark all the special expression/statements as children, except
255
475k
    /// for the associated statement.
256
475k
    return child_range(ChildStorage, ChildStorage + 1);
257
475k
  }
258
259
0
  const_child_range children() const {
260
0
    if (!hasAssociatedStmt())
261
0
      return const_child_range(const_child_iterator(), const_child_iterator());
262
0
    Stmt **ChildStorage = reinterpret_cast<Stmt **>(
263
0
        const_cast<OMPExecutableDirective *>(this)->getClauses().end());
264
0
    return const_child_range(ChildStorage, ChildStorage + 1);
265
0
  }
266
267
16.9k
  ArrayRef<OMPClause *> clauses() { return getClauses(); }
268
269
83.5k
  ArrayRef<OMPClause *> clauses() const {
270
83.5k
    return const_cast<OMPExecutableDirective *>(this)->getClauses();
271
83.5k
  }
272
273
  /// Returns whether or not this is a Standalone directive.
274
  ///
275
  /// Stand-alone directives are executable directives
276
  /// that have no associated user code.
277
  bool isStandaloneDirective() const;
278
279
  /// Returns the AST node representing OpenMP structured-block of this
280
  /// OpenMP executable directive,
281
  /// Prerequisite: Executable Directive must not be Standalone directive.
282
  const Stmt *getStructuredBlock() const;
283
284
23.6k
  Stmt *getStructuredBlock() {
285
23.6k
    return const_cast<Stmt *>(
286
23.6k
        const_cast<const OMPExecutableDirective *>(this)->getStructuredBlock());
287
23.6k
  }
288
};
289
290
/// This represents '#pragma omp parallel' directive.
291
///
292
/// \code
293
/// #pragma omp parallel private(a,b) reduction(+: c,d)
294
/// \endcode
295
/// In this example directive '#pragma omp parallel' has clauses 'private'
296
/// with the variables 'a' and 'b' and 'reduction' with operator '+' and
297
/// variables 'c' and 'd'.
298
///
299
class OMPParallelDirective : public OMPExecutableDirective {
300
  friend class ASTStmtReader;
301
  /// true if the construct has inner cancel directive.
302
  bool HasCancel;
303
304
  /// Build directive with the given start and end location.
305
  ///
306
  /// \param StartLoc Starting location of the directive (directive keyword).
307
  /// \param EndLoc Ending Location of the directive.
308
  ///
309
  OMPParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc,
310
                       unsigned NumClauses)
311
      : OMPExecutableDirective(this, OMPParallelDirectiveClass, OMPD_parallel,
312
                               StartLoc, EndLoc, NumClauses, 1),
313
1.83k
        HasCancel(false) {}
314
315
  /// Build an empty directive.
316
  ///
317
  /// \param NumClauses Number of clauses.
318
  ///
319
  explicit OMPParallelDirective(unsigned NumClauses)
320
      : OMPExecutableDirective(this, OMPParallelDirectiveClass, OMPD_parallel,
321
                               SourceLocation(), SourceLocation(), NumClauses,
322
                               1),
323
81
        HasCancel(false) {}
324
325
  /// Set cancel state.
326
1.91k
  void setHasCancel(bool Has) { HasCancel = Has; }
327
328
public:
329
  /// Creates directive with a list of \a Clauses.
330
  ///
331
  /// \param C AST context.
332
  /// \param StartLoc Starting location of the directive kind.
333
  /// \param EndLoc Ending Location of the directive.
334
  /// \param Clauses List of clauses.
335
  /// \param AssociatedStmt Statement associated with the directive.
336
  /// \param HasCancel true if this directive has inner cancel directive.
337
  ///
338
  static OMPParallelDirective *
339
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
340
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel);
341
342
  /// Creates an empty directive with the place for \a N clauses.
343
  ///
344
  /// \param C AST context.
345
  /// \param NumClauses Number of clauses.
346
  ///
347
  static OMPParallelDirective *CreateEmpty(const ASTContext &C,
348
                                           unsigned NumClauses, EmptyShell);
349
350
  /// Return true if current directive has inner cancel directive.
351
163
  bool hasCancel() const { return HasCancel; }
352
353
1.25k
  static bool classof(const Stmt *T) {
354
1.25k
    return T->getStmtClass() == OMPParallelDirectiveClass;
355
1.25k
  }
356
};
357
358
/// This is a common base class for loop directives ('omp simd', 'omp
359
/// for', 'omp for simd' etc.). It is responsible for the loop code generation.
360
///
361
class OMPLoopDirective : public OMPExecutableDirective {
362
  friend class ASTStmtReader;
363
  /// Number of collapsed loops as specified by 'collapse' clause.
364
  unsigned CollapsedNum;
365
366
  /// Offsets to the stored exprs.
367
  /// This enumeration contains offsets to all the pointers to children
368
  /// expressions stored in OMPLoopDirective.
369
  /// The first 9 children are necessary for all the loop directives,
370
  /// the next 8 are specific to the worksharing ones, and the next 11 are
371
  /// used for combined constructs containing two pragmas associated to loops.
372
  /// After the fixed children, three arrays of length CollapsedNum are
373
  /// allocated: loop counters, their updates and final values.
374
  /// PrevLowerBound and PrevUpperBound are used to communicate blocking
375
  /// information in composite constructs which require loop blocking
376
  /// DistInc is used to generate the increment expression for the distribute
377
  /// loop when combined with a further nested loop
378
  /// PrevEnsureUpperBound is used as the EnsureUpperBound expression for the
379
  /// for loop when combined with a previous distribute loop in the same pragma
380
  /// (e.g. 'distribute parallel for')
381
  ///
382
  enum {
383
    AssociatedStmtOffset = 0,
384
    IterationVariableOffset = 1,
385
    LastIterationOffset = 2,
386
    CalcLastIterationOffset = 3,
387
    PreConditionOffset = 4,
388
    CondOffset = 5,
389
    InitOffset = 6,
390
    IncOffset = 7,
391
    PreInitsOffset = 8,
392
    // The '...End' enumerators do not correspond to child expressions - they
393
    // specify the offset to the end (and start of the following counters/
394
    // updates/finals arrays).
395
    DefaultEnd = 9,
396
    // The following 8 exprs are used by worksharing and distribute loops only.
397
    IsLastIterVariableOffset = 9,
398
    LowerBoundVariableOffset = 10,
399
    UpperBoundVariableOffset = 11,
400
    StrideVariableOffset = 12,
401
    EnsureUpperBoundOffset = 13,
402
    NextLowerBoundOffset = 14,
403
    NextUpperBoundOffset = 15,
404
    NumIterationsOffset = 16,
405
    // Offset to the end for worksharing loop directives.
406
    WorksharingEnd = 17,
407
    PrevLowerBoundVariableOffset = 17,
408
    PrevUpperBoundVariableOffset = 18,
409
    DistIncOffset = 19,
410
    PrevEnsureUpperBoundOffset = 20,
411
    CombinedLowerBoundVariableOffset = 21,
412
    CombinedUpperBoundVariableOffset = 22,
413
    CombinedEnsureUpperBoundOffset = 23,
414
    CombinedInitOffset = 24,
415
    CombinedConditionOffset = 25,
416
    CombinedNextLowerBoundOffset = 26,
417
    CombinedNextUpperBoundOffset = 27,
418
    CombinedDistConditionOffset = 28,
419
    CombinedParForInDistConditionOffset = 29,
420
    // Offset to the end (and start of the following counters/updates/finals
421
    // arrays) for combined distribute loop directives.
422
    CombinedDistributeEnd = 30,
423
  };
424
425
  /// Get the counters storage.
426
18.8k
  MutableArrayRef<Expr *> getCounters() {
427
18.8k
    Expr **Storage = reinterpret_cast<Expr **>(
428
18.8k
        &(*(std::next(child_begin(), getArraysOffset(getDirectiveKind())))));
429
18.8k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
430
18.8k
  }
431
432
  /// Get the private counters storage.
433
15.3k
  MutableArrayRef<Expr *> getPrivateCounters() {
434
15.3k
    Expr **Storage = reinterpret_cast<Expr **>(&*std::next(
435
15.3k
        child_begin(), getArraysOffset(getDirectiveKind()) + CollapsedNum));
436
15.3k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
437
15.3k
  }
438
439
  /// Get the updates storage.
440
13.1k
  MutableArrayRef<Expr *> getInits() {
441
13.1k
    Expr **Storage = reinterpret_cast<Expr **>(
442
13.1k
        &*std::next(child_begin(),
443
13.1k
                    getArraysOffset(getDirectiveKind()) + 2 * CollapsedNum));
444
13.1k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
445
13.1k
  }
446
447
  /// Get the updates storage.
448
13.9k
  MutableArrayRef<Expr *> getUpdates() {
449
13.9k
    Expr **Storage = reinterpret_cast<Expr **>(
450
13.9k
        &*std::next(child_begin(),
451
13.9k
                    getArraysOffset(getDirectiveKind()) + 3 * CollapsedNum));
452
13.9k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
453
13.9k
  }
454
455
  /// Get the final counter updates storage.
456
13.7k
  MutableArrayRef<Expr *> getFinals() {
457
13.7k
    Expr **Storage = reinterpret_cast<Expr **>(
458
13.7k
        &*std::next(child_begin(),
459
13.7k
                    getArraysOffset(getDirectiveKind()) + 4 * CollapsedNum));
460
13.7k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
461
13.7k
  }
462
463
protected:
464
  /// Build instance of loop directive of class \a Kind.
465
  ///
466
  /// \param SC Statement class.
467
  /// \param Kind Kind of OpenMP directive.
468
  /// \param StartLoc Starting location of the directive (directive keyword).
469
  /// \param EndLoc Ending location of the directive.
470
  /// \param CollapsedNum Number of collapsed loops from 'collapse' clause.
471
  /// \param NumClauses Number of clauses.
472
  /// \param NumSpecialChildren Number of additional directive-specific stmts.
473
  ///
474
  template <typename T>
475
  OMPLoopDirective(const T *That, StmtClass SC, OpenMPDirectiveKind Kind,
476
                   SourceLocation StartLoc, SourceLocation EndLoc,
477
                   unsigned CollapsedNum, unsigned NumClauses,
478
                   unsigned NumSpecialChildren = 0)
479
      : OMPExecutableDirective(That, SC, Kind, StartLoc, EndLoc, NumClauses,
480
                               numLoopChildren(CollapsedNum, Kind) +
481
                                   NumSpecialChildren),
482
12.2k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPSimdDirective>(clang::OMPSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
481
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPForDirective>(clang::OMPForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
634
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPForSimdDirective>(clang::OMPForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
371
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPParallelForDirective>(clang::OMPParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
730
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPParallelForSimdDirective>(clang::OMPParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
504
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetParallelForDirective>(clang::OMPTargetParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
551
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTaskLoopDirective>(clang::OMPTaskLoopDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
411
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTaskLoopSimdDirective>(clang::OMPTaskLoopSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
274
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeDirective>(clang::OMPDistributeDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
212
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeParallelForDirective>(clang::OMPDistributeParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
592
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeParallelForSimdDirective>(clang::OMPDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
756
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeSimdDirective>(clang::OMPDistributeSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
361
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetParallelForSimdDirective>(clang::OMPTargetParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
997
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetSimdDirective>(clang::OMPTargetSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
524
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeDirective>(clang::OMPTeamsDistributeDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
422
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeSimdDirective>(clang::OMPTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
417
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeParallelForSimdDirective>(clang::OMPTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
290
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeParallelForDirective>(clang::OMPTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
515
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeDirective>(clang::OMPTargetTeamsDistributeDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
559
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeParallelForDirective>(clang::OMPTargetTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
780
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeParallelForSimdDirective>(clang::OMPTargetTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
1.07k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeSimdDirective>(clang::OMPTargetTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, clang::OpenMPDirectiveKind, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
482
801
        CollapsedNum(CollapsedNum) {}
483
484
  /// Offset to the start of children expression arrays.
485
99.6k
  static unsigned getArraysOffset(OpenMPDirectiveKind Kind) {
486
99.6k
    if (isOpenMPLoopBoundSharingDirective(Kind))
487
34.0k
      return CombinedDistributeEnd;
488
65.5k
    if (isOpenMPWorksharingDirective(Kind) || 
isOpenMPTaskLoopDirective(Kind)36.4k
||
489
65.5k
        
isOpenMPDistributeDirective(Kind)31.4k
)
490
57.1k
      return WorksharingEnd;
491
8.37k
    return DefaultEnd;
492
8.37k
  }
493
494
  /// Children number.
495
  static unsigned numLoopChildren(unsigned CollapsedNum,
496
24.5k
                                  OpenMPDirectiveKind Kind) {
497
24.5k
    return getArraysOffset(Kind) + 5 * CollapsedNum; // Counters,
498
24.5k
                                                     // PrivateCounters, Inits,
499
24.5k
                                                     // Updates and Finals
500
24.5k
  }
501
502
12.2k
  void setIterationVariable(Expr *IV) {
503
12.2k
    *std::next(child_begin(), IterationVariableOffset) = IV;
504
12.2k
  }
505
12.2k
  void setLastIteration(Expr *LI) {
506
12.2k
    *std::next(child_begin(), LastIterationOffset) = LI;
507
12.2k
  }
508
12.2k
  void setCalcLastIteration(Expr *CLI) {
509
12.2k
    *std::next(child_begin(), CalcLastIterationOffset) = CLI;
510
12.2k
  }
511
12.2k
  void setPreCond(Expr *PC) {
512
12.2k
    *std::next(child_begin(), PreConditionOffset) = PC;
513
12.2k
  }
514
12.2k
  void setCond(Expr *Cond) {
515
12.2k
    *std::next(child_begin(), CondOffset) = Cond;
516
12.2k
  }
517
12.2k
  void setInit(Expr *Init) { *std::next(child_begin(), InitOffset) = Init; }
518
12.2k
  void setInc(Expr *Inc) { *std::next(child_begin(), IncOffset) = Inc; }
519
12.2k
  void setPreInits(Stmt *PreInits) {
520
12.2k
    *std::next(child_begin(), PreInitsOffset) = PreInits;
521
12.2k
  }
522
11.2k
  void setIsLastIterVariable(Expr *IL) {
523
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
524
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
525
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
526
11.2k
           "expected worksharing loop directive");
527
11.2k
    *std::next(child_begin(), IsLastIterVariableOffset) = IL;
528
11.2k
  }
529
11.2k
  void setLowerBoundVariable(Expr *LB) {
530
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
531
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
532
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
533
11.2k
           "expected worksharing loop directive");
534
11.2k
    *std::next(child_begin(), LowerBoundVariableOffset) = LB;
535
11.2k
  }
536
11.2k
  void setUpperBoundVariable(Expr *UB) {
537
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
538
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
539
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
540
11.2k
           "expected worksharing loop directive");
541
11.2k
    *std::next(child_begin(), UpperBoundVariableOffset) = UB;
542
11.2k
  }
543
11.2k
  void setStrideVariable(Expr *ST) {
544
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
545
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
546
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
547
11.2k
           "expected worksharing loop directive");
548
11.2k
    *std::next(child_begin(), StrideVariableOffset) = ST;
549
11.2k
  }
550
11.2k
  void setEnsureUpperBound(Expr *EUB) {
551
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
552
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
553
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
554
11.2k
           "expected worksharing loop directive");
555
11.2k
    *std::next(child_begin(), EnsureUpperBoundOffset) = EUB;
556
11.2k
  }
557
11.2k
  void setNextLowerBound(Expr *NLB) {
558
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
559
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
560
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
561
11.2k
           "expected worksharing loop directive");
562
11.2k
    *std::next(child_begin(), NextLowerBoundOffset) = NLB;
563
11.2k
  }
564
11.2k
  void setNextUpperBound(Expr *NUB) {
565
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
566
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
567
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
568
11.2k
           "expected worksharing loop directive");
569
11.2k
    *std::next(child_begin(), NextUpperBoundOffset) = NUB;
570
11.2k
  }
571
11.2k
  void setNumIterations(Expr *NI) {
572
11.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
573
11.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
574
11.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
575
11.2k
           "expected worksharing loop directive");
576
11.2k
    *std::next(child_begin(), NumIterationsOffset) = NI;
577
11.2k
  }
578
4.01k
  void setPrevLowerBoundVariable(Expr *PrevLB) {
579
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
580
4.01k
           "expected loop bound sharing directive");
581
4.01k
    *std::next(child_begin(), PrevLowerBoundVariableOffset) = PrevLB;
582
4.01k
  }
583
4.01k
  void setPrevUpperBoundVariable(Expr *PrevUB) {
584
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
585
4.01k
           "expected loop bound sharing directive");
586
4.01k
    *std::next(child_begin(), PrevUpperBoundVariableOffset) = PrevUB;
587
4.01k
  }
588
4.01k
  void setDistInc(Expr *DistInc) {
589
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
590
4.01k
           "expected loop bound sharing directive");
591
4.01k
    *std::next(child_begin(), DistIncOffset) = DistInc;
592
4.01k
  }
593
4.01k
  void setPrevEnsureUpperBound(Expr *PrevEUB) {
594
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
595
4.01k
           "expected loop bound sharing directive");
596
4.01k
    *std::next(child_begin(), PrevEnsureUpperBoundOffset) = PrevEUB;
597
4.01k
  }
598
4.01k
  void setCombinedLowerBoundVariable(Expr *CombLB) {
599
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
600
4.01k
           "expected loop bound sharing directive");
601
4.01k
    *std::next(child_begin(), CombinedLowerBoundVariableOffset) = CombLB;
602
4.01k
  }
603
4.01k
  void setCombinedUpperBoundVariable(Expr *CombUB) {
604
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
605
4.01k
           "expected loop bound sharing directive");
606
4.01k
    *std::next(child_begin(), CombinedUpperBoundVariableOffset) = CombUB;
607
4.01k
  }
608
4.01k
  void setCombinedEnsureUpperBound(Expr *CombEUB) {
609
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
610
4.01k
           "expected loop bound sharing directive");
611
4.01k
    *std::next(child_begin(), CombinedEnsureUpperBoundOffset) = CombEUB;
612
4.01k
  }
613
4.01k
  void setCombinedInit(Expr *CombInit) {
614
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
615
4.01k
           "expected loop bound sharing directive");
616
4.01k
    *std::next(child_begin(), CombinedInitOffset) = CombInit;
617
4.01k
  }
618
4.01k
  void setCombinedCond(Expr *CombCond) {
619
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
620
4.01k
           "expected loop bound sharing directive");
621
4.01k
    *std::next(child_begin(), CombinedConditionOffset) = CombCond;
622
4.01k
  }
623
4.01k
  void setCombinedNextLowerBound(Expr *CombNLB) {
624
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
625
4.01k
           "expected loop bound sharing directive");
626
4.01k
    *std::next(child_begin(), CombinedNextLowerBoundOffset) = CombNLB;
627
4.01k
  }
628
4.01k
  void setCombinedNextUpperBound(Expr *CombNUB) {
629
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
630
4.01k
           "expected loop bound sharing directive");
631
4.01k
    *std::next(child_begin(), CombinedNextUpperBoundOffset) = CombNUB;
632
4.01k
  }
633
4.01k
  void setCombinedDistCond(Expr *CombDistCond) {
634
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
635
4.01k
           "expected loop bound distribute sharing directive");
636
4.01k
    *std::next(child_begin(), CombinedDistConditionOffset) = CombDistCond;
637
4.01k
  }
638
4.01k
  void setCombinedParForInDistCond(Expr *CombParForInDistCond) {
639
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
640
4.01k
           "expected loop bound distribute sharing directive");
641
4.01k
    *std::next(child_begin(),
642
4.01k
               CombinedParForInDistConditionOffset) = CombParForInDistCond;
643
4.01k
  }
644
  void setCounters(ArrayRef<Expr *> A);
645
  void setPrivateCounters(ArrayRef<Expr *> A);
646
  void setInits(ArrayRef<Expr *> A);
647
  void setUpdates(ArrayRef<Expr *> A);
648
  void setFinals(ArrayRef<Expr *> A);
649
650
public:
651
  /// The expressions built to support OpenMP loops in combined/composite
652
  /// pragmas (e.g. pragma omp distribute parallel for)
653
  struct DistCombinedHelperExprs {
654
    /// DistributeLowerBound - used when composing 'omp distribute' with
655
    /// 'omp for' in a same construct.
656
    Expr *LB;
657
    /// DistributeUpperBound - used when composing 'omp distribute' with
658
    /// 'omp for' in a same construct.
659
    Expr *UB;
660
    /// DistributeEnsureUpperBound - used when composing 'omp distribute'
661
    ///  with 'omp for' in a same construct, EUB depends on DistUB
662
    Expr *EUB;
663
    /// Distribute loop iteration variable init used when composing 'omp
664
    /// distribute'
665
    ///  with 'omp for' in a same construct
666
    Expr *Init;
667
    /// Distribute Loop condition used when composing 'omp distribute'
668
    ///  with 'omp for' in a same construct
669
    Expr *Cond;
670
    /// Update of LowerBound for statically scheduled omp loops for
671
    /// outer loop in combined constructs (e.g. 'distribute parallel for')
672
    Expr *NLB;
673
    /// Update of UpperBound for statically scheduled omp loops for
674
    /// outer loop in combined constructs (e.g. 'distribute parallel for')
675
    Expr *NUB;
676
    /// Distribute Loop condition used when composing 'omp distribute'
677
    ///  with 'omp for' in a same construct when schedule is chunked.
678
    Expr *DistCond;
679
    /// 'omp parallel for' loop condition used when composed with
680
    /// 'omp distribute' in the same construct and when schedule is
681
    /// chunked and the chunk size is 1.
682
    Expr *ParForInDistCond;
683
  };
684
685
  /// The expressions built for the OpenMP loop CodeGen for the
686
  /// whole collapsed loop nest.
687
  struct HelperExprs {
688
    /// Loop iteration variable.
689
    Expr *IterationVarRef;
690
    /// Loop last iteration number.
691
    Expr *LastIteration;
692
    /// Loop number of iterations.
693
    Expr *NumIterations;
694
    /// Calculation of last iteration.
695
    Expr *CalcLastIteration;
696
    /// Loop pre-condition.
697
    Expr *PreCond;
698
    /// Loop condition.
699
    Expr *Cond;
700
    /// Loop iteration variable init.
701
    Expr *Init;
702
    /// Loop increment.
703
    Expr *Inc;
704
    /// IsLastIteration - local flag variable passed to runtime.
705
    Expr *IL;
706
    /// LowerBound - local variable passed to runtime.
707
    Expr *LB;
708
    /// UpperBound - local variable passed to runtime.
709
    Expr *UB;
710
    /// Stride - local variable passed to runtime.
711
    Expr *ST;
712
    /// EnsureUpperBound -- expression UB = min(UB, NumIterations).
713
    Expr *EUB;
714
    /// Update of LowerBound for statically scheduled 'omp for' loops.
715
    Expr *NLB;
716
    /// Update of UpperBound for statically scheduled 'omp for' loops.
717
    Expr *NUB;
718
    /// PreviousLowerBound - local variable passed to runtime in the
719
    /// enclosing schedule or null if that does not apply.
720
    Expr *PrevLB;
721
    /// PreviousUpperBound - local variable passed to runtime in the
722
    /// enclosing schedule or null if that does not apply.
723
    Expr *PrevUB;
724
    /// DistInc - increment expression for distribute loop when found
725
    /// combined with a further loop level (e.g. in 'distribute parallel for')
726
    /// expression IV = IV + ST
727
    Expr *DistInc;
728
    /// PrevEUB - expression similar to EUB but to be used when loop
729
    /// scheduling uses PrevLB and PrevUB (e.g.  in 'distribute parallel for'
730
    /// when ensuring that the UB is either the calculated UB by the runtime or
731
    /// the end of the assigned distribute chunk)
732
    /// expression UB = min (UB, PrevUB)
733
    Expr *PrevEUB;
734
    /// Counters Loop counters.
735
    SmallVector<Expr *, 4> Counters;
736
    /// PrivateCounters Loop counters.
737
    SmallVector<Expr *, 4> PrivateCounters;
738
    /// Expressions for loop counters inits for CodeGen.
739
    SmallVector<Expr *, 4> Inits;
740
    /// Expressions for loop counters update for CodeGen.
741
    SmallVector<Expr *, 4> Updates;
742
    /// Final loop counter values for GodeGen.
743
    SmallVector<Expr *, 4> Finals;
744
    /// Init statement for all captured expressions.
745
    Stmt *PreInits;
746
747
    /// Expressions used when combining OpenMP loop pragmas
748
    DistCombinedHelperExprs DistCombinedFields;
749
750
    /// Check if all the expressions are built (does not check the
751
    /// worksharing ones).
752
0
    bool builtAll() {
753
0
      return IterationVarRef != nullptr && LastIteration != nullptr &&
754
0
             NumIterations != nullptr && PreCond != nullptr &&
755
0
             Cond != nullptr && Init != nullptr && Inc != nullptr;
756
0
    }
757
758
    /// Initialize all the fields to null.
759
    /// \param Size Number of elements in the counters/finals/updates arrays.
760
11.6k
    void clear(unsigned Size) {
761
11.6k
      IterationVarRef = nullptr;
762
11.6k
      LastIteration = nullptr;
763
11.6k
      CalcLastIteration = nullptr;
764
11.6k
      PreCond = nullptr;
765
11.6k
      Cond = nullptr;
766
11.6k
      Init = nullptr;
767
11.6k
      Inc = nullptr;
768
11.6k
      IL = nullptr;
769
11.6k
      LB = nullptr;
770
11.6k
      UB = nullptr;
771
11.6k
      ST = nullptr;
772
11.6k
      EUB = nullptr;
773
11.6k
      NLB = nullptr;
774
11.6k
      NUB = nullptr;
775
11.6k
      NumIterations = nullptr;
776
11.6k
      PrevLB = nullptr;
777
11.6k
      PrevUB = nullptr;
778
11.6k
      DistInc = nullptr;
779
11.6k
      PrevEUB = nullptr;
780
11.6k
      Counters.resize(Size);
781
11.6k
      PrivateCounters.resize(Size);
782
11.6k
      Inits.resize(Size);
783
11.6k
      Updates.resize(Size);
784
11.6k
      Finals.resize(Size);
785
23.4k
      for (unsigned i = 0; i < Size; 
++i11.8k
) {
786
11.8k
        Counters[i] = nullptr;
787
11.8k
        PrivateCounters[i] = nullptr;
788
11.8k
        Inits[i] = nullptr;
789
11.8k
        Updates[i] = nullptr;
790
11.8k
        Finals[i] = nullptr;
791
11.8k
      }
792
11.6k
      PreInits = nullptr;
793
11.6k
      DistCombinedFields.LB = nullptr;
794
11.6k
      DistCombinedFields.UB = nullptr;
795
11.6k
      DistCombinedFields.EUB = nullptr;
796
11.6k
      DistCombinedFields.Init = nullptr;
797
11.6k
      DistCombinedFields.Cond = nullptr;
798
11.6k
      DistCombinedFields.NLB = nullptr;
799
11.6k
      DistCombinedFields.NUB = nullptr;
800
11.6k
      DistCombinedFields.DistCond = nullptr;
801
11.6k
      DistCombinedFields.ParForInDistCond = nullptr;
802
11.6k
    }
803
  };
804
805
  /// Get number of collapsed loops.
806
1.28k
  unsigned getCollapsedNumber() const { return CollapsedNum; }
807
808
3.19k
  Expr *getIterationVariable() const {
809
3.19k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
810
3.19k
        *std::next(child_begin(), IterationVariableOffset)));
811
3.19k
  }
812
2.08k
  Expr *getLastIteration() const {
813
2.08k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
814
2.08k
        *std::next(child_begin(), LastIterationOffset)));
815
2.08k
  }
816
629
  Expr *getCalcLastIteration() const {
817
629
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
818
629
        *std::next(child_begin(), CalcLastIterationOffset)));
819
629
  }
820
2.27k
  Expr *getPreCond() const {
821
2.27k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
822
2.27k
        *std::next(child_begin(), PreConditionOffset)));
823
2.27k
  }
824
1.70k
  Expr *getCond() const {
825
1.70k
    return const_cast<Expr *>(
826
1.70k
        reinterpret_cast<const Expr *>(*std::next(child_begin(), CondOffset)));
827
1.70k
  }
828
1.73k
  Expr *getInit() const {
829
1.73k
    return const_cast<Expr *>(
830
1.73k
        reinterpret_cast<const Expr *>(*std::next(child_begin(), InitOffset)));
831
1.73k
  }
832
1.73k
  Expr *getInc() const {
833
1.73k
    return const_cast<Expr *>(
834
1.73k
        reinterpret_cast<const Expr *>(*std::next(child_begin(), IncOffset)));
835
1.73k
  }
836
1.78k
  const Stmt *getPreInits() const {
837
1.78k
    return *std::next(child_begin(), PreInitsOffset);
838
1.78k
  }
839
629
  Stmt *getPreInits() { return *std::next(child_begin(), PreInitsOffset); }
840
1.64k
  Expr *getIsLastIterVariable() const {
841
1.64k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
842
1.64k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
843
1.64k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
844
1.64k
           "expected worksharing loop directive");
845
1.64k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
846
1.64k
        *std::next(child_begin(), IsLastIterVariableOffset)));
847
1.64k
  }
848
1.60k
  Expr *getLowerBoundVariable() const {
849
1.60k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
850
1.60k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
851
1.60k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
852
1.60k
           "expected worksharing loop directive");
853
1.60k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
854
1.60k
        *std::next(child_begin(), LowerBoundVariableOffset)));
855
1.60k
  }
856
1.60k
  Expr *getUpperBoundVariable() const {
857
1.60k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
858
1.60k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
859
1.60k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
860
1.60k
           "expected worksharing loop directive");
861
1.60k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
862
1.60k
        *std::next(child_begin(), UpperBoundVariableOffset)));
863
1.60k
  }
864
1.66k
  Expr *getStrideVariable() const {
865
1.66k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
866
1.66k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
867
1.66k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
868
1.66k
           "expected worksharing loop directive");
869
1.66k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
870
1.66k
        *std::next(child_begin(), StrideVariableOffset)));
871
1.66k
  }
872
1.44k
  Expr *getEnsureUpperBound() const {
873
1.44k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
874
1.44k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
875
1.44k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
876
1.44k
           "expected worksharing loop directive");
877
1.44k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
878
1.44k
        *std::next(child_begin(), EnsureUpperBoundOffset)));
879
1.44k
  }
880
748
  Expr *getNextLowerBound() const {
881
748
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
882
748
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
883
748
            isOpenMPDistributeDirective(getDirectiveKind())) &&
884
748
           "expected worksharing loop directive");
885
748
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
886
748
        *std::next(child_begin(), NextLowerBoundOffset)));
887
748
  }
888
748
  Expr *getNextUpperBound() const {
889
748
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
890
748
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
891
748
            isOpenMPDistributeDirective(getDirectiveKind())) &&
892
748
           "expected worksharing loop directive");
893
748
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
894
748
        *std::next(child_begin(), NextUpperBoundOffset)));
895
748
  }
896
947
  Expr *getNumIterations() const {
897
947
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
898
947
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
899
947
            isOpenMPDistributeDirective(getDirectiveKind())) &&
900
947
           "expected worksharing loop directive");
901
947
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
902
947
        *std::next(child_begin(), NumIterationsOffset)));
903
947
  }
904
1.43k
  Expr *getPrevLowerBoundVariable() const {
905
1.43k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
906
1.43k
           "expected loop bound sharing directive");
907
1.43k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
908
1.43k
        *std::next(child_begin(), PrevLowerBoundVariableOffset)));
909
1.43k
  }
910
1.43k
  Expr *getPrevUpperBoundVariable() const {
911
1.43k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
912
1.43k
           "expected loop bound sharing directive");
913
1.43k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
914
1.43k
        *std::next(child_begin(), PrevUpperBoundVariableOffset)));
915
1.43k
  }
916
574
  Expr *getDistInc() const {
917
574
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
918
574
           "expected loop bound sharing directive");
919
574
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
920
574
        *std::next(child_begin(), DistIncOffset)));
921
574
  }
922
548
  Expr *getPrevEnsureUpperBound() const {
923
548
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
924
548
           "expected loop bound sharing directive");
925
548
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
926
548
        *std::next(child_begin(), PrevEnsureUpperBoundOffset)));
927
548
  }
928
842
  Expr *getCombinedLowerBoundVariable() const {
929
842
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
930
842
           "expected loop bound sharing directive");
931
842
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
932
842
        *std::next(child_begin(), CombinedLowerBoundVariableOffset)));
933
842
  }
934
842
  Expr *getCombinedUpperBoundVariable() const {
935
842
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
936
842
           "expected loop bound sharing directive");
937
842
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
938
842
        *std::next(child_begin(), CombinedUpperBoundVariableOffset)));
939
842
  }
940
611
  Expr *getCombinedEnsureUpperBound() const {
941
611
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
942
611
           "expected loop bound sharing directive");
943
611
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
944
611
        *std::next(child_begin(), CombinedEnsureUpperBoundOffset)));
945
611
  }
946
611
  Expr *getCombinedInit() const {
947
611
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
948
611
           "expected loop bound sharing directive");
949
611
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
950
611
        *std::next(child_begin(), CombinedInitOffset)));
951
611
  }
952
548
  Expr *getCombinedCond() const {
953
548
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
954
548
           "expected loop bound sharing directive");
955
548
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
956
548
        *std::next(child_begin(), CombinedConditionOffset)));
957
548
  }
958
317
  Expr *getCombinedNextLowerBound() const {
959
317
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
960
317
           "expected loop bound sharing directive");
961
317
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
962
317
        *std::next(child_begin(), CombinedNextLowerBoundOffset)));
963
317
  }
964
317
  Expr *getCombinedNextUpperBound() const {
965
317
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
966
317
           "expected loop bound sharing directive");
967
317
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
968
317
        *std::next(child_begin(), CombinedNextUpperBoundOffset)));
969
317
  }
970
317
  Expr *getCombinedDistCond() const {
971
317
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
972
317
           "expected loop bound distribute sharing directive");
973
317
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
974
317
        *std::next(child_begin(), CombinedDistConditionOffset)));
975
317
  }
976
280
  Expr *getCombinedParForInDistCond() const {
977
280
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
978
280
           "expected loop bound distribute sharing directive");
979
280
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
980
280
        *std::next(child_begin(), CombinedParForInDistConditionOffset)));
981
280
  }
982
12.6k
  const Stmt *getBody() const {
983
12.6k
    // This relies on the loop form is already checked by Sema.
984
12.6k
    const Stmt *Body =
985
12.6k
        getInnermostCapturedStmt()->getCapturedStmt()->IgnoreContainers();
986
12.6k
    Body = cast<ForStmt>(Body)->getBody();
987
12.8k
    for (unsigned Cnt = 1; Cnt < CollapsedNum; 
++Cnt186
) {
988
186
      Body = Body->IgnoreContainers();
989
186
      Body = cast<ForStmt>(Body)->getBody();
990
186
    }
991
12.6k
    return Body;
992
12.6k
  }
993
994
629
  ArrayRef<Expr *> counters() { return getCounters(); }
995
996
5.99k
  ArrayRef<Expr *> counters() const {
997
5.99k
    return const_cast<OMPLoopDirective *>(this)->getCounters();
998
5.99k
  }
999
1000
629
  ArrayRef<Expr *> private_counters() { return getPrivateCounters(); }
1001
1002
2.47k
  ArrayRef<Expr *> private_counters() const {
1003
2.47k
    return const_cast<OMPLoopDirective *>(this)->getPrivateCounters();
1004
2.47k
  }
1005
1006
629
  ArrayRef<Expr *> inits() { return getInits(); }
1007
1008
242
  ArrayRef<Expr *> inits() const {
1009
242
    return const_cast<OMPLoopDirective *>(this)->getInits();
1010
242
  }
1011
1012
629
  ArrayRef<Expr *> updates() { return getUpdates(); }
1013
1014
1.10k
  ArrayRef<Expr *> updates() const {
1015
1.10k
    return const_cast<OMPLoopDirective *>(this)->getUpdates();
1016
1.10k
  }
1017
1018
629
  ArrayRef<Expr *> finals() { return getFinals(); }
1019
1020
878
  ArrayRef<Expr *> finals() const {
1021
878
    return const_cast<OMPLoopDirective *>(this)->getFinals();
1022
878
  }
1023
1024
24.7k
  static bool classof(const Stmt *T) {
1025
24.7k
    return T->getStmtClass() == OMPSimdDirectiveClass ||
1026
24.7k
           
T->getStmtClass() == OMPForDirectiveClass24.3k
||
1027
24.7k
           
T->getStmtClass() == OMPForSimdDirectiveClass23.6k
||
1028
24.7k
           
T->getStmtClass() == OMPParallelForDirectiveClass23.3k
||
1029
24.7k
           
T->getStmtClass() == OMPParallelForSimdDirectiveClass22.6k
||
1030
24.7k
           
T->getStmtClass() == OMPTaskLoopDirectiveClass22.1k
||
1031
24.7k
           
T->getStmtClass() == OMPTaskLoopSimdDirectiveClass21.6k
||
1032
24.7k
           
T->getStmtClass() == OMPDistributeDirectiveClass21.4k
||
1033
24.7k
           
T->getStmtClass() == OMPTargetParallelForDirectiveClass21.2k
||
1034
24.7k
           
T->getStmtClass() == OMPDistributeParallelForDirectiveClass20.7k
||
1035
24.7k
           
T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass20.1k
||
1036
24.7k
           
T->getStmtClass() == OMPDistributeSimdDirectiveClass19.4k
||
1037
24.7k
           
T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass19.0k
||
1038
24.7k
           
T->getStmtClass() == OMPTargetSimdDirectiveClass18.1k
||
1039
24.7k
           
T->getStmtClass() == OMPTeamsDistributeDirectiveClass17.6k
||
1040
24.7k
           
T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass17.2k
||
1041
24.7k
           T->getStmtClass() ==
1042
16.8k
               OMPTeamsDistributeParallelForSimdDirectiveClass ||
1043
24.7k
           
T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass16.6k
||
1044
24.7k
           T->getStmtClass() ==
1045
16.0k
               OMPTargetTeamsDistributeParallelForDirectiveClass ||
1046
24.7k
           T->getStmtClass() ==
1047
15.2k
               OMPTargetTeamsDistributeParallelForSimdDirectiveClass ||
1048
24.7k
           
T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass14.2k
||
1049
24.7k
           
T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass13.7k
;
1050
24.7k
  }
1051
};
1052
1053
/// This represents '#pragma omp simd' directive.
1054
///
1055
/// \code
1056
/// #pragma omp simd private(a,b) linear(i,j:s) reduction(+:c,d)
1057
/// \endcode
1058
/// In this example directive '#pragma omp simd' has clauses 'private'
1059
/// with the variables 'a' and 'b', 'linear' with variables 'i', 'j' and
1060
/// linear step 's', 'reduction' with operator '+' and variables 'c' and 'd'.
1061
///
1062
class OMPSimdDirective : public OMPLoopDirective {
1063
  friend class ASTStmtReader;
1064
  /// Build directive with the given start and end location.
1065
  ///
1066
  /// \param StartLoc Starting location of the directive kind.
1067
  /// \param EndLoc Ending location of the directive.
1068
  /// \param CollapsedNum Number of collapsed nested loops.
1069
  /// \param NumClauses Number of clauses.
1070
  ///
1071
  OMPSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1072
                   unsigned CollapsedNum, unsigned NumClauses)
1073
      : OMPLoopDirective(this, OMPSimdDirectiveClass, OMPD_simd, StartLoc,
1074
480
                         EndLoc, CollapsedNum, NumClauses) {}
1075
1076
  /// Build an empty directive.
1077
  ///
1078
  /// \param CollapsedNum Number of collapsed nested loops.
1079
  /// \param NumClauses Number of clauses.
1080
  ///
1081
  explicit OMPSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
1082
      : OMPLoopDirective(this, OMPSimdDirectiveClass, OMPD_simd,
1083
                         SourceLocation(), SourceLocation(), CollapsedNum,
1084
1
                         NumClauses) {}
1085
1086
public:
1087
  /// Creates directive with a list of \a Clauses.
1088
  ///
1089
  /// \param C AST context.
1090
  /// \param StartLoc Starting location of the directive kind.
1091
  /// \param EndLoc Ending Location of the directive.
1092
  /// \param CollapsedNum Number of collapsed loops.
1093
  /// \param Clauses List of clauses.
1094
  /// \param AssociatedStmt Statement, associated with the directive.
1095
  /// \param Exprs Helper expressions for CodeGen.
1096
  ///
1097
  static OMPSimdDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1098
                                  SourceLocation EndLoc, unsigned CollapsedNum,
1099
                                  ArrayRef<OMPClause *> Clauses,
1100
                                  Stmt *AssociatedStmt,
1101
                                  const HelperExprs &Exprs);
1102
1103
  /// Creates an empty directive with the place
1104
  /// for \a NumClauses clauses.
1105
  ///
1106
  /// \param C AST context.
1107
  /// \param CollapsedNum Number of collapsed nested loops.
1108
  /// \param NumClauses Number of clauses.
1109
  ///
1110
  static OMPSimdDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1111
                                       unsigned CollapsedNum, EmptyShell);
1112
1113
  static bool classof(const Stmt *T) {
1114
    return T->getStmtClass() == OMPSimdDirectiveClass;
1115
  }
1116
};
1117
1118
/// This represents '#pragma omp for' directive.
1119
///
1120
/// \code
1121
/// #pragma omp for private(a,b) reduction(+:c,d)
1122
/// \endcode
1123
/// In this example directive '#pragma omp for' has clauses 'private' with the
1124
/// variables 'a' and 'b' and 'reduction' with operator '+' and variables 'c'
1125
/// and 'd'.
1126
///
1127
class OMPForDirective : public OMPLoopDirective {
1128
  friend class ASTStmtReader;
1129
1130
  /// true if current directive has inner cancel directive.
1131
  bool HasCancel;
1132
1133
  /// Build directive with the given start and end location.
1134
  ///
1135
  /// \param StartLoc Starting location of the directive kind.
1136
  /// \param EndLoc Ending location of the directive.
1137
  /// \param CollapsedNum Number of collapsed nested loops.
1138
  /// \param NumClauses Number of clauses.
1139
  ///
1140
  OMPForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1141
                  unsigned CollapsedNum, unsigned NumClauses)
1142
      : OMPLoopDirective(this, OMPForDirectiveClass, OMPD_for, StartLoc, EndLoc,
1143
                         CollapsedNum, NumClauses),
1144
573
        HasCancel(false) {}
1145
1146
  /// Build an empty directive.
1147
  ///
1148
  /// \param CollapsedNum Number of collapsed nested loops.
1149
  /// \param NumClauses Number of clauses.
1150
  ///
1151
  explicit OMPForDirective(unsigned CollapsedNum, unsigned NumClauses)
1152
      : OMPLoopDirective(this, OMPForDirectiveClass, OMPD_for, SourceLocation(),
1153
                         SourceLocation(), CollapsedNum, NumClauses),
1154
61
        HasCancel(false) {}
1155
1156
  /// Set cancel state.
1157
634
  void setHasCancel(bool Has) { HasCancel = Has; }
1158
1159
public:
1160
  /// Creates directive with a list of \a Clauses.
1161
  ///
1162
  /// \param C AST context.
1163
  /// \param StartLoc Starting location of the directive kind.
1164
  /// \param EndLoc Ending Location of the directive.
1165
  /// \param CollapsedNum Number of collapsed loops.
1166
  /// \param Clauses List of clauses.
1167
  /// \param AssociatedStmt Statement, associated with the directive.
1168
  /// \param Exprs Helper expressions for CodeGen.
1169
  /// \param HasCancel true if current directive has inner cancel directive.
1170
  ///
1171
  static OMPForDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1172
                                 SourceLocation EndLoc, unsigned CollapsedNum,
1173
                                 ArrayRef<OMPClause *> Clauses,
1174
                                 Stmt *AssociatedStmt, const HelperExprs &Exprs,
1175
                                 bool HasCancel);
1176
1177
  /// Creates an empty directive with the place
1178
  /// for \a NumClauses clauses.
1179
  ///
1180
  /// \param C AST context.
1181
  /// \param CollapsedNum Number of collapsed nested loops.
1182
  /// \param NumClauses Number of clauses.
1183
  ///
1184
  static OMPForDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1185
                                      unsigned CollapsedNum, EmptyShell);
1186
1187
  /// Return true if current directive has inner cancel directive.
1188
140
  bool hasCancel() const { return HasCancel; }
1189
1190
  static bool classof(const Stmt *T) {
1191
    return T->getStmtClass() == OMPForDirectiveClass;
1192
  }
1193
};
1194
1195
/// This represents '#pragma omp for simd' directive.
1196
///
1197
/// \code
1198
/// #pragma omp for simd private(a,b) linear(i,j:s) reduction(+:c,d)
1199
/// \endcode
1200
/// In this example directive '#pragma omp for simd' has clauses 'private'
1201
/// with the variables 'a' and 'b', 'linear' with variables 'i', 'j' and
1202
/// linear step 's', 'reduction' with operator '+' and variables 'c' and 'd'.
1203
///
1204
class OMPForSimdDirective : public OMPLoopDirective {
1205
  friend class ASTStmtReader;
1206
  /// Build directive with the given start and end location.
1207
  ///
1208
  /// \param StartLoc Starting location of the directive kind.
1209
  /// \param EndLoc Ending location of the directive.
1210
  /// \param CollapsedNum Number of collapsed nested loops.
1211
  /// \param NumClauses Number of clauses.
1212
  ///
1213
  OMPForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1214
                      unsigned CollapsedNum, unsigned NumClauses)
1215
      : OMPLoopDirective(this, OMPForSimdDirectiveClass, OMPD_for_simd,
1216
370
                         StartLoc, EndLoc, CollapsedNum, NumClauses) {}
1217
1218
  /// Build an empty directive.
1219
  ///
1220
  /// \param CollapsedNum Number of collapsed nested loops.
1221
  /// \param NumClauses Number of clauses.
1222
  ///
1223
  explicit OMPForSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
1224
      : OMPLoopDirective(this, OMPForSimdDirectiveClass, OMPD_for_simd,
1225
                         SourceLocation(), SourceLocation(), CollapsedNum,
1226
1
                         NumClauses) {}
1227
1228
public:
1229
  /// Creates directive with a list of \a Clauses.
1230
  ///
1231
  /// \param C AST context.
1232
  /// \param StartLoc Starting location of the directive kind.
1233
  /// \param EndLoc Ending Location of the directive.
1234
  /// \param CollapsedNum Number of collapsed loops.
1235
  /// \param Clauses List of clauses.
1236
  /// \param AssociatedStmt Statement, associated with the directive.
1237
  /// \param Exprs Helper expressions for CodeGen.
1238
  ///
1239
  static OMPForSimdDirective *
1240
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1241
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1242
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
1243
1244
  /// Creates an empty directive with the place
1245
  /// for \a NumClauses clauses.
1246
  ///
1247
  /// \param C AST context.
1248
  /// \param CollapsedNum Number of collapsed nested loops.
1249
  /// \param NumClauses Number of clauses.
1250
  ///
1251
  static OMPForSimdDirective *CreateEmpty(const ASTContext &C,
1252
                                          unsigned NumClauses,
1253
                                          unsigned CollapsedNum, EmptyShell);
1254
1255
  static bool classof(const Stmt *T) {
1256
    return T->getStmtClass() == OMPForSimdDirectiveClass;
1257
  }
1258
};
1259
1260
/// This represents '#pragma omp sections' directive.
1261
///
1262
/// \code
1263
/// #pragma omp sections private(a,b) reduction(+:c,d)
1264
/// \endcode
1265
/// In this example directive '#pragma omp sections' has clauses 'private' with
1266
/// the variables 'a' and 'b' and 'reduction' with operator '+' and variables
1267
/// 'c' and 'd'.
1268
///
1269
class OMPSectionsDirective : public OMPExecutableDirective {
1270
  friend class ASTStmtReader;
1271
1272
  /// true if current directive has inner cancel directive.
1273
  bool HasCancel;
1274
1275
  /// Build directive with the given start and end location.
1276
  ///
1277
  /// \param StartLoc Starting location of the directive kind.
1278
  /// \param EndLoc Ending location of the directive.
1279
  /// \param NumClauses Number of clauses.
1280
  ///
1281
  OMPSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1282
                       unsigned NumClauses)
1283
      : OMPExecutableDirective(this, OMPSectionsDirectiveClass, OMPD_sections,
1284
                               StartLoc, EndLoc, NumClauses, 1),
1285
25
        HasCancel(false) {}
1286
1287
  /// Build an empty directive.
1288
  ///
1289
  /// \param NumClauses Number of clauses.
1290
  ///
1291
  explicit OMPSectionsDirective(unsigned NumClauses)
1292
      : OMPExecutableDirective(this, OMPSectionsDirectiveClass, OMPD_sections,
1293
                               SourceLocation(), SourceLocation(), NumClauses,
1294
                               1),
1295
4
        HasCancel(false) {}
1296
1297
  /// Set cancel state.
1298
29
  void setHasCancel(bool Has) { HasCancel = Has; }
1299
1300
public:
1301
  /// Creates directive with a list of \a Clauses.
1302
  ///
1303
  /// \param C AST context.
1304
  /// \param StartLoc Starting location of the directive kind.
1305
  /// \param EndLoc Ending Location of the directive.
1306
  /// \param Clauses List of clauses.
1307
  /// \param AssociatedStmt Statement, associated with the directive.
1308
  /// \param HasCancel true if current directive has inner directive.
1309
  ///
1310
  static OMPSectionsDirective *
1311
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1312
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel);
1313
1314
  /// Creates an empty directive with the place for \a NumClauses
1315
  /// clauses.
1316
  ///
1317
  /// \param C AST context.
1318
  /// \param NumClauses Number of clauses.
1319
  ///
1320
  static OMPSectionsDirective *CreateEmpty(const ASTContext &C,
1321
                                           unsigned NumClauses, EmptyShell);
1322
1323
  /// Return true if current directive has inner cancel directive.
1324
14
  bool hasCancel() const { return HasCancel; }
1325
1326
2
  static bool classof(const Stmt *T) {
1327
2
    return T->getStmtClass() == OMPSectionsDirectiveClass;
1328
2
  }
1329
};
1330
1331
/// This represents '#pragma omp section' directive.
1332
///
1333
/// \code
1334
/// #pragma omp section
1335
/// \endcode
1336
///
1337
class OMPSectionDirective : public OMPExecutableDirective {
1338
  friend class ASTStmtReader;
1339
1340
  /// true if current directive has inner cancel directive.
1341
  bool HasCancel;
1342
1343
  /// Build directive with the given start and end location.
1344
  ///
1345
  /// \param StartLoc Starting location of the directive kind.
1346
  /// \param EndLoc Ending location of the directive.
1347
  ///
1348
  OMPSectionDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1349
      : OMPExecutableDirective(this, OMPSectionDirectiveClass, OMPD_section,
1350
                               StartLoc, EndLoc, 0, 1),
1351
40
        HasCancel(false) {}
1352
1353
  /// Build an empty directive.
1354
  ///
1355
  explicit OMPSectionDirective()
1356
      : OMPExecutableDirective(this, OMPSectionDirectiveClass, OMPD_section,
1357
                               SourceLocation(), SourceLocation(), 0, 1),
1358
5
        HasCancel(false) {}
1359
1360
public:
1361
  /// Creates directive.
1362
  ///
1363
  /// \param C AST context.
1364
  /// \param StartLoc Starting location of the directive kind.
1365
  /// \param EndLoc Ending Location of the directive.
1366
  /// \param AssociatedStmt Statement, associated with the directive.
1367
  /// \param HasCancel true if current directive has inner directive.
1368
  ///
1369
  static OMPSectionDirective *Create(const ASTContext &C,
1370
                                     SourceLocation StartLoc,
1371
                                     SourceLocation EndLoc,
1372
                                     Stmt *AssociatedStmt, bool HasCancel);
1373
1374
  /// Creates an empty directive.
1375
  ///
1376
  /// \param C AST context.
1377
  ///
1378
  static OMPSectionDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1379
1380
  /// Set cancel state.
1381
81
  void setHasCancel(bool Has) { HasCancel = Has; }
1382
1383
  /// Return true if current directive has inner cancel directive.
1384
18
  bool hasCancel() const { return HasCancel; }
1385
1386
38
  static bool classof(const Stmt *T) {
1387
38
    return T->getStmtClass() == OMPSectionDirectiveClass;
1388
38
  }
1389
};
1390
1391
/// This represents '#pragma omp single' directive.
1392
///
1393
/// \code
1394
/// #pragma omp single private(a,b) copyprivate(c,d)
1395
/// \endcode
1396
/// In this example directive '#pragma omp single' has clauses 'private' with
1397
/// the variables 'a' and 'b' and 'copyprivate' with variables 'c' and 'd'.
1398
///
1399
class OMPSingleDirective : public OMPExecutableDirective {
1400
  friend class ASTStmtReader;
1401
  /// Build directive with the given start and end location.
1402
  ///
1403
  /// \param StartLoc Starting location of the directive kind.
1404
  /// \param EndLoc Ending location of the directive.
1405
  /// \param NumClauses Number of clauses.
1406
  ///
1407
  OMPSingleDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1408
                     unsigned NumClauses)
1409
      : OMPExecutableDirective(this, OMPSingleDirectiveClass, OMPD_single,
1410
125
                               StartLoc, EndLoc, NumClauses, 1) {}
1411
1412
  /// Build an empty directive.
1413
  ///
1414
  /// \param NumClauses Number of clauses.
1415
  ///
1416
  explicit OMPSingleDirective(unsigned NumClauses)
1417
      : OMPExecutableDirective(this, OMPSingleDirectiveClass, OMPD_single,
1418
                               SourceLocation(), SourceLocation(), NumClauses,
1419
8
                               1) {}
1420
1421
public:
1422
  /// Creates directive with a list of \a Clauses.
1423
  ///
1424
  /// \param C AST context.
1425
  /// \param StartLoc Starting location of the directive kind.
1426
  /// \param EndLoc Ending Location of the directive.
1427
  /// \param Clauses List of clauses.
1428
  /// \param AssociatedStmt Statement, associated with the directive.
1429
  ///
1430
  static OMPSingleDirective *
1431
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1432
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
1433
1434
  /// Creates an empty directive with the place for \a NumClauses
1435
  /// clauses.
1436
  ///
1437
  /// \param C AST context.
1438
  /// \param NumClauses Number of clauses.
1439
  ///
1440
  static OMPSingleDirective *CreateEmpty(const ASTContext &C,
1441
                                         unsigned NumClauses, EmptyShell);
1442
1443
  static bool classof(const Stmt *T) {
1444
    return T->getStmtClass() == OMPSingleDirectiveClass;
1445
  }
1446
};
1447
1448
/// This represents '#pragma omp master' directive.
1449
///
1450
/// \code
1451
/// #pragma omp master
1452
/// \endcode
1453
///
1454
class OMPMasterDirective : public OMPExecutableDirective {
1455
  friend class ASTStmtReader;
1456
  /// Build directive with the given start and end location.
1457
  ///
1458
  /// \param StartLoc Starting location of the directive kind.
1459
  /// \param EndLoc Ending location of the directive.
1460
  ///
1461
  OMPMasterDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1462
      : OMPExecutableDirective(this, OMPMasterDirectiveClass, OMPD_master,
1463
11
                               StartLoc, EndLoc, 0, 1) {}
1464
1465
  /// Build an empty directive.
1466
  ///
1467
  explicit OMPMasterDirective()
1468
      : OMPExecutableDirective(this, OMPMasterDirectiveClass, OMPD_master,
1469
0
                               SourceLocation(), SourceLocation(), 0, 1) {}
1470
1471
public:
1472
  /// Creates directive.
1473
  ///
1474
  /// \param C AST context.
1475
  /// \param StartLoc Starting location of the directive kind.
1476
  /// \param EndLoc Ending Location of the directive.
1477
  /// \param AssociatedStmt Statement, associated with the directive.
1478
  ///
1479
  static OMPMasterDirective *Create(const ASTContext &C,
1480
                                    SourceLocation StartLoc,
1481
                                    SourceLocation EndLoc,
1482
                                    Stmt *AssociatedStmt);
1483
1484
  /// Creates an empty directive.
1485
  ///
1486
  /// \param C AST context.
1487
  ///
1488
  static OMPMasterDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1489
1490
  static bool classof(const Stmt *T) {
1491
    return T->getStmtClass() == OMPMasterDirectiveClass;
1492
  }
1493
};
1494
1495
/// This represents '#pragma omp critical' directive.
1496
///
1497
/// \code
1498
/// #pragma omp critical
1499
/// \endcode
1500
///
1501
class OMPCriticalDirective : public OMPExecutableDirective {
1502
  friend class ASTStmtReader;
1503
  /// Name of the directive.
1504
  DeclarationNameInfo DirName;
1505
  /// Build directive with the given start and end location.
1506
  ///
1507
  /// \param Name Name of the directive.
1508
  /// \param StartLoc Starting location of the directive kind.
1509
  /// \param EndLoc Ending location of the directive.
1510
  /// \param NumClauses Number of clauses.
1511
  ///
1512
  OMPCriticalDirective(const DeclarationNameInfo &Name, SourceLocation StartLoc,
1513
                       SourceLocation EndLoc, unsigned NumClauses)
1514
      : OMPExecutableDirective(this, OMPCriticalDirectiveClass, OMPD_critical,
1515
                               StartLoc, EndLoc, NumClauses, 1),
1516
173
        DirName(Name) {}
1517
1518
  /// Build an empty directive.
1519
  ///
1520
  /// \param NumClauses Number of clauses.
1521
  ///
1522
  explicit OMPCriticalDirective(unsigned NumClauses)
1523
      : OMPExecutableDirective(this, OMPCriticalDirectiveClass, OMPD_critical,
1524
                               SourceLocation(), SourceLocation(), NumClauses,
1525
                               1),
1526
4
        DirName() {}
1527
1528
  /// Set name of the directive.
1529
  ///
1530
  /// \param Name Name of the directive.
1531
  ///
1532
  void setDirectiveName(const DeclarationNameInfo &Name) { DirName = Name; }
1533
1534
public:
1535
  /// Creates directive.
1536
  ///
1537
  /// \param C AST context.
1538
  /// \param Name Name of the directive.
1539
  /// \param StartLoc Starting location of the directive kind.
1540
  /// \param EndLoc Ending Location of the directive.
1541
  /// \param Clauses List of clauses.
1542
  /// \param AssociatedStmt Statement, associated with the directive.
1543
  ///
1544
  static OMPCriticalDirective *
1545
  Create(const ASTContext &C, const DeclarationNameInfo &Name,
1546
         SourceLocation StartLoc, SourceLocation EndLoc,
1547
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
1548
1549
  /// Creates an empty directive.
1550
  ///
1551
  /// \param C AST context.
1552
  /// \param NumClauses Number of clauses.
1553
  ///
1554
  static OMPCriticalDirective *CreateEmpty(const ASTContext &C,
1555
                                           unsigned NumClauses, EmptyShell);
1556
1557
  /// Return name of the directive.
1558
  ///
1559
189
  DeclarationNameInfo getDirectiveName() const { return DirName; }
1560
1561
  static bool classof(const Stmt *T) {
1562
    return T->getStmtClass() == OMPCriticalDirectiveClass;
1563
  }
1564
};
1565
1566
/// This represents '#pragma omp parallel for' directive.
1567
///
1568
/// \code
1569
/// #pragma omp parallel for private(a,b) reduction(+:c,d)
1570
/// \endcode
1571
/// In this example directive '#pragma omp parallel for' has clauses 'private'
1572
/// with the variables 'a' and 'b' and 'reduction' with operator '+' and
1573
/// variables 'c' and 'd'.
1574
///
1575
class OMPParallelForDirective : public OMPLoopDirective {
1576
  friend class ASTStmtReader;
1577
1578
  /// true if current region has inner cancel directive.
1579
  bool HasCancel;
1580
1581
  /// Build directive with the given start and end location.
1582
  ///
1583
  /// \param StartLoc Starting location of the directive kind.
1584
  /// \param EndLoc Ending location of the directive.
1585
  /// \param CollapsedNum Number of collapsed nested loops.
1586
  /// \param NumClauses Number of clauses.
1587
  ///
1588
  OMPParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1589
                          unsigned CollapsedNum, unsigned NumClauses)
1590
      : OMPLoopDirective(this, OMPParallelForDirectiveClass, OMPD_parallel_for,
1591
                         StartLoc, EndLoc, CollapsedNum, NumClauses),
1592
719
        HasCancel(false) {}
1593
1594
  /// Build an empty directive.
1595
  ///
1596
  /// \param CollapsedNum Number of collapsed nested loops.
1597
  /// \param NumClauses Number of clauses.
1598
  ///
1599
  explicit OMPParallelForDirective(unsigned CollapsedNum, unsigned NumClauses)
1600
      : OMPLoopDirective(this, OMPParallelForDirectiveClass, OMPD_parallel_for,
1601
                         SourceLocation(), SourceLocation(), CollapsedNum,
1602
                         NumClauses),
1603
11
        HasCancel(false) {}
1604
1605
  /// Set cancel state.
1606
730
  void setHasCancel(bool Has) { HasCancel = Has; }
1607
1608
public:
1609
  /// Creates directive with a list of \a Clauses.
1610
  ///
1611
  /// \param C AST context.
1612
  /// \param StartLoc Starting location of the directive kind.
1613
  /// \param EndLoc Ending Location of the directive.
1614
  /// \param CollapsedNum Number of collapsed loops.
1615
  /// \param Clauses List of clauses.
1616
  /// \param AssociatedStmt Statement, associated with the directive.
1617
  /// \param Exprs Helper expressions for CodeGen.
1618
  /// \param HasCancel true if current directive has inner cancel directive.
1619
  ///
1620
  static OMPParallelForDirective *
1621
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1622
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1623
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
1624
1625
  /// Creates an empty directive with the place
1626
  /// for \a NumClauses clauses.
1627
  ///
1628
  /// \param C AST context.
1629
  /// \param CollapsedNum Number of collapsed nested loops.
1630
  /// \param NumClauses Number of clauses.
1631
  ///
1632
  static OMPParallelForDirective *CreateEmpty(const ASTContext &C,
1633
                                              unsigned NumClauses,
1634
                                              unsigned CollapsedNum,
1635
                                              EmptyShell);
1636
1637
  /// Return true if current directive has inner cancel directive.
1638
64
  bool hasCancel() const { return HasCancel; }
1639
1640
1.15k
  static bool classof(const Stmt *T) {
1641
1.15k
    return T->getStmtClass() == OMPParallelForDirectiveClass;
1642
1.15k
  }
1643
};
1644
1645
/// This represents '#pragma omp parallel for simd' directive.
1646
///
1647
/// \code
1648
/// #pragma omp parallel for simd private(a,b) linear(i,j:s) reduction(+:c,d)
1649
/// \endcode
1650
/// In this example directive '#pragma omp parallel for simd' has clauses
1651
/// 'private' with the variables 'a' and 'b', 'linear' with variables 'i', 'j'
1652
/// and linear step 's', 'reduction' with operator '+' and variables 'c' and
1653
/// 'd'.
1654
///
1655
class OMPParallelForSimdDirective : public OMPLoopDirective {
1656
  friend class ASTStmtReader;
1657
  /// Build directive with the given start and end location.
1658
  ///
1659
  /// \param StartLoc Starting location of the directive kind.
1660
  /// \param EndLoc Ending location of the directive.
1661
  /// \param CollapsedNum Number of collapsed nested loops.
1662
  /// \param NumClauses Number of clauses.
1663
  ///
1664
  OMPParallelForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1665
                              unsigned CollapsedNum, unsigned NumClauses)
1666
      : OMPLoopDirective(this, OMPParallelForSimdDirectiveClass,
1667
                         OMPD_parallel_for_simd, StartLoc, EndLoc, CollapsedNum,
1668
504
                         NumClauses) {}
1669
1670
  /// Build an empty directive.
1671
  ///
1672
  /// \param CollapsedNum Number of collapsed nested loops.
1673
  /// \param NumClauses Number of clauses.
1674
  ///
1675
  explicit OMPParallelForSimdDirective(unsigned CollapsedNum,
1676
                                       unsigned NumClauses)
1677
      : OMPLoopDirective(this, OMPParallelForSimdDirectiveClass,
1678
                         OMPD_parallel_for_simd, SourceLocation(),
1679
0
                         SourceLocation(), CollapsedNum, NumClauses) {}
1680
1681
public:
1682
  /// Creates directive with a list of \a Clauses.
1683
  ///
1684
  /// \param C AST context.
1685
  /// \param StartLoc Starting location of the directive kind.
1686
  /// \param EndLoc Ending Location of the directive.
1687
  /// \param CollapsedNum Number of collapsed loops.
1688
  /// \param Clauses List of clauses.
1689
  /// \param AssociatedStmt Statement, associated with the directive.
1690
  /// \param Exprs Helper expressions for CodeGen.
1691
  ///
1692
  static OMPParallelForSimdDirective *
1693
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1694
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1695
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
1696
1697
  /// Creates an empty directive with the place
1698
  /// for \a NumClauses clauses.
1699
  ///
1700
  /// \param C AST context.
1701
  /// \param CollapsedNum Number of collapsed nested loops.
1702
  /// \param NumClauses Number of clauses.
1703
  ///
1704
  static OMPParallelForSimdDirective *CreateEmpty(const ASTContext &C,
1705
                                                  unsigned NumClauses,
1706
                                                  unsigned CollapsedNum,
1707
                                                  EmptyShell);
1708
1709
  static bool classof(const Stmt *T) {
1710
    return T->getStmtClass() == OMPParallelForSimdDirectiveClass;
1711
  }
1712
};
1713
1714
/// This represents '#pragma omp parallel sections' directive.
1715
///
1716
/// \code
1717
/// #pragma omp parallel sections private(a,b) reduction(+:c,d)
1718
/// \endcode
1719
/// In this example directive '#pragma omp parallel sections' has clauses
1720
/// 'private' with the variables 'a' and 'b' and 'reduction' with operator '+'
1721
/// and variables 'c' and 'd'.
1722
///
1723
class OMPParallelSectionsDirective : public OMPExecutableDirective {
1724
  friend class ASTStmtReader;
1725
1726
  /// true if current directive has inner cancel directive.
1727
  bool HasCancel;
1728
1729
  /// Build directive with the given start and end location.
1730
  ///
1731
  /// \param StartLoc Starting location of the directive kind.
1732
  /// \param EndLoc Ending location of the directive.
1733
  /// \param NumClauses Number of clauses.
1734
  ///
1735
  OMPParallelSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1736
                               unsigned NumClauses)
1737
      : OMPExecutableDirective(this, OMPParallelSectionsDirectiveClass,
1738
                               OMPD_parallel_sections, StartLoc, EndLoc,
1739
                               NumClauses, 1),
1740
486
        HasCancel(false) {}
1741
1742
  /// Build an empty directive.
1743
  ///
1744
  /// \param NumClauses Number of clauses.
1745
  ///
1746
  explicit OMPParallelSectionsDirective(unsigned NumClauses)
1747
      : OMPExecutableDirective(this, OMPParallelSectionsDirectiveClass,
1748
                               OMPD_parallel_sections, SourceLocation(),
1749
                               SourceLocation(), NumClauses, 1),
1750
2
        HasCancel(false) {}
1751
1752
  /// Set cancel state.
1753
488
  void setHasCancel(bool Has) { HasCancel = Has; }
1754
1755
public:
1756
  /// Creates directive with a list of \a Clauses.
1757
  ///
1758
  /// \param C AST context.
1759
  /// \param StartLoc Starting location of the directive kind.
1760
  /// \param EndLoc Ending Location of the directive.
1761
  /// \param Clauses List of clauses.
1762
  /// \param AssociatedStmt Statement, associated with the directive.
1763
  /// \param HasCancel true if current directive has inner cancel directive.
1764
  ///
1765
  static OMPParallelSectionsDirective *
1766
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1767
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel);
1768
1769
  /// Creates an empty directive with the place for \a NumClauses
1770
  /// clauses.
1771
  ///
1772
  /// \param C AST context.
1773
  /// \param NumClauses Number of clauses.
1774
  ///
1775
  static OMPParallelSectionsDirective *
1776
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
1777
1778
  /// Return true if current directive has inner cancel directive.
1779
9
  bool hasCancel() const { return HasCancel; }
1780
1781
1.15k
  static bool classof(const Stmt *T) {
1782
1.15k
    return T->getStmtClass() == OMPParallelSectionsDirectiveClass;
1783
1.15k
  }
1784
};
1785
1786
/// This represents '#pragma omp task' directive.
1787
///
1788
/// \code
1789
/// #pragma omp task private(a,b) final(d)
1790
/// \endcode
1791
/// In this example directive '#pragma omp task' has clauses 'private' with the
1792
/// variables 'a' and 'b' and 'final' with condition 'd'.
1793
///
1794
class OMPTaskDirective : public OMPExecutableDirective {
1795
  friend class ASTStmtReader;
1796
  /// true if this directive has inner cancel directive.
1797
  bool HasCancel;
1798
1799
  /// Build directive with the given start and end location.
1800
  ///
1801
  /// \param StartLoc Starting location of the directive kind.
1802
  /// \param EndLoc Ending location of the directive.
1803
  /// \param NumClauses Number of clauses.
1804
  ///
1805
  OMPTaskDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1806
                   unsigned NumClauses)
1807
      : OMPExecutableDirective(this, OMPTaskDirectiveClass, OMPD_task, StartLoc,
1808
                               EndLoc, NumClauses, 1),
1809
99
        HasCancel(false) {}
1810
1811
  /// Build an empty directive.
1812
  ///
1813
  /// \param NumClauses Number of clauses.
1814
  ///
1815
  explicit OMPTaskDirective(unsigned NumClauses)
1816
      : OMPExecutableDirective(this, OMPTaskDirectiveClass, OMPD_task,
1817
                               SourceLocation(), SourceLocation(), NumClauses,
1818
                               1),
1819
2
        HasCancel(false) {}
1820
1821
  /// Set cancel state.
1822
101
  void setHasCancel(bool Has) { HasCancel = Has; }
1823
1824
public:
1825
  /// Creates directive with a list of \a Clauses.
1826
  ///
1827
  /// \param C AST context.
1828
  /// \param StartLoc Starting location of the directive kind.
1829
  /// \param EndLoc Ending Location of the directive.
1830
  /// \param Clauses List of clauses.
1831
  /// \param AssociatedStmt Statement, associated with the directive.
1832
  /// \param HasCancel true, if current directive has inner cancel directive.
1833
  ///
1834
  static OMPTaskDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1835
                                  SourceLocation EndLoc,
1836
                                  ArrayRef<OMPClause *> Clauses,
1837
                                  Stmt *AssociatedStmt, bool HasCancel);
1838
1839
  /// Creates an empty directive with the place for \a NumClauses
1840
  /// clauses.
1841
  ///
1842
  /// \param C AST context.
1843
  /// \param NumClauses Number of clauses.
1844
  ///
1845
  static OMPTaskDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1846
                                       EmptyShell);
1847
1848
  /// Return true if current directive has inner cancel directive.
1849
23
  bool hasCancel() const { return HasCancel; }
1850
1851
87
  static bool classof(const Stmt *T) {
1852
87
    return T->getStmtClass() == OMPTaskDirectiveClass;
1853
87
  }
1854
};
1855
1856
/// This represents '#pragma omp taskyield' directive.
1857
///
1858
/// \code
1859
/// #pragma omp taskyield
1860
/// \endcode
1861
///
1862
class OMPTaskyieldDirective : public OMPExecutableDirective {
1863
  friend class ASTStmtReader;
1864
  /// Build directive with the given start and end location.
1865
  ///
1866
  /// \param StartLoc Starting location of the directive kind.
1867
  /// \param EndLoc Ending location of the directive.
1868
  ///
1869
  OMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1870
      : OMPExecutableDirective(this, OMPTaskyieldDirectiveClass, OMPD_taskyield,
1871
11
                               StartLoc, EndLoc, 0, 0) {}
1872
1873
  /// Build an empty directive.
1874
  ///
1875
  explicit OMPTaskyieldDirective()
1876
      : OMPExecutableDirective(this, OMPTaskyieldDirectiveClass, OMPD_taskyield,
1877
4
                               SourceLocation(), SourceLocation(), 0, 0) {}
1878
1879
public:
1880
  /// Creates directive.
1881
  ///
1882
  /// \param C AST context.
1883
  /// \param StartLoc Starting location of the directive kind.
1884
  /// \param EndLoc Ending Location of the directive.
1885
  ///
1886
  static OMPTaskyieldDirective *
1887
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
1888
1889
  /// Creates an empty directive.
1890
  ///
1891
  /// \param C AST context.
1892
  ///
1893
  static OMPTaskyieldDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1894
1895
274
  static bool classof(const Stmt *T) {
1896
274
    return T->getStmtClass() == OMPTaskyieldDirectiveClass;
1897
274
  }
1898
};
1899
1900
/// This represents '#pragma omp barrier' directive.
1901
///
1902
/// \code
1903
/// #pragma omp barrier
1904
/// \endcode
1905
///
1906
class OMPBarrierDirective : public OMPExecutableDirective {
1907
  friend class ASTStmtReader;
1908
  /// Build directive with the given start and end location.
1909
  ///
1910
  /// \param StartLoc Starting location of the directive kind.
1911
  /// \param EndLoc Ending location of the directive.
1912
  ///
1913
  OMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1914
      : OMPExecutableDirective(this, OMPBarrierDirectiveClass, OMPD_barrier,
1915
35
                               StartLoc, EndLoc, 0, 0) {}
1916
1917
  /// Build an empty directive.
1918
  ///
1919
  explicit OMPBarrierDirective()
1920
      : OMPExecutableDirective(this, OMPBarrierDirectiveClass, OMPD_barrier,
1921
10
                               SourceLocation(), SourceLocation(), 0, 0) {}
1922
1923
public:
1924
  /// Creates directive.
1925
  ///
1926
  /// \param C AST context.
1927
  /// \param StartLoc Starting location of the directive kind.
1928
  /// \param EndLoc Ending Location of the directive.
1929
  ///
1930
  static OMPBarrierDirective *
1931
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
1932
1933
  /// Creates an empty directive.
1934
  ///
1935
  /// \param C AST context.
1936
  ///
1937
  static OMPBarrierDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1938
1939
274
  static bool classof(const Stmt *T) {
1940
274
    return T->getStmtClass() == OMPBarrierDirectiveClass;
1941
274
  }
1942
};
1943
1944
/// This represents '#pragma omp taskwait' directive.
1945
///
1946
/// \code
1947
/// #pragma omp taskwait
1948
/// \endcode
1949
///
1950
class OMPTaskwaitDirective : public OMPExecutableDirective {
1951
  friend class ASTStmtReader;
1952
  /// Build directive with the given start and end location.
1953
  ///
1954
  /// \param StartLoc Starting location of the directive kind.
1955
  /// \param EndLoc Ending location of the directive.
1956
  ///
1957
  OMPTaskwaitDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1958
      : OMPExecutableDirective(this, OMPTaskwaitDirectiveClass, OMPD_taskwait,
1959
5
                               StartLoc, EndLoc, 0, 0) {}
1960
1961
  /// Build an empty directive.
1962
  ///
1963
  explicit OMPTaskwaitDirective()
1964
      : OMPExecutableDirective(this, OMPTaskwaitDirectiveClass, OMPD_taskwait,
1965
0
                               SourceLocation(), SourceLocation(), 0, 0) {}
1966
1967
public:
1968
  /// Creates directive.
1969
  ///
1970
  /// \param C AST context.
1971
  /// \param StartLoc Starting location of the directive kind.
1972
  /// \param EndLoc Ending Location of the directive.
1973
  ///
1974
  static OMPTaskwaitDirective *
1975
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
1976
1977
  /// Creates an empty directive.
1978
  ///
1979
  /// \param C AST context.
1980
  ///
1981
  static OMPTaskwaitDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1982
1983
  static bool classof(const Stmt *T) {
1984
    return T->getStmtClass() == OMPTaskwaitDirectiveClass;
1985
  }
1986
};
1987
1988
/// This represents '#pragma omp taskgroup' directive.
1989
///
1990
/// \code
1991
/// #pragma omp taskgroup
1992
/// \endcode
1993
///
1994
class OMPTaskgroupDirective : public OMPExecutableDirective {
1995
  friend class ASTStmtReader;
1996
  /// Build directive with the given start and end location.
1997
  ///
1998
  /// \param StartLoc Starting location of the directive kind.
1999
  /// \param EndLoc Ending location of the directive.
2000
  /// \param NumClauses Number of clauses.
2001
  ///
2002
  OMPTaskgroupDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2003
                        unsigned NumClauses)
2004
      : OMPExecutableDirective(this, OMPTaskgroupDirectiveClass, OMPD_taskgroup,
2005
228
                               StartLoc, EndLoc, NumClauses, 2) {}
2006
2007
  /// Build an empty directive.
2008
  /// \param NumClauses Number of clauses.
2009
  ///
2010
  explicit OMPTaskgroupDirective(unsigned NumClauses)
2011
      : OMPExecutableDirective(this, OMPTaskgroupDirectiveClass, OMPD_taskgroup,
2012
                               SourceLocation(), SourceLocation(), NumClauses,
2013
4
                               2) {}
2014
2015
  /// Sets the task_reduction return variable.
2016
232
  void setReductionRef(Expr *RR) {
2017
232
    *std::next(child_begin(), 1) = RR;
2018
232
  }
2019
2020
public:
2021
  /// Creates directive.
2022
  ///
2023
  /// \param C AST context.
2024
  /// \param StartLoc Starting location of the directive kind.
2025
  /// \param EndLoc Ending Location of the directive.
2026
  /// \param Clauses List of clauses.
2027
  /// \param AssociatedStmt Statement, associated with the directive.
2028
  /// \param ReductionRef Reference to the task_reduction return variable.
2029
  ///
2030
  static OMPTaskgroupDirective *
2031
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2032
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2033
         Expr *ReductionRef);
2034
2035
  /// Creates an empty directive.
2036
  ///
2037
  /// \param C AST context.
2038
  /// \param NumClauses Number of clauses.
2039
  ///
2040
  static OMPTaskgroupDirective *CreateEmpty(const ASTContext &C,
2041
                                            unsigned NumClauses, EmptyShell);
2042
2043
2044
  /// Returns reference to the task_reduction return variable.
2045
10
  const Expr *getReductionRef() const {
2046
10
    return static_cast<const Expr *>(*std::next(child_begin(), 1));
2047
10
  }
2048
4
  Expr *getReductionRef() {
2049
4
    return static_cast<Expr *>(*std::next(child_begin(), 1));
2050
4
  }
2051
2052
1.35k
  static bool classof(const Stmt *T) {
2053
1.35k
    return T->getStmtClass() == OMPTaskgroupDirectiveClass;
2054
1.35k
  }
2055
};
2056
2057
/// This represents '#pragma omp flush' directive.
2058
///
2059
/// \code
2060
/// #pragma omp flush(a,b)
2061
/// \endcode
2062
/// In this example directive '#pragma omp flush' has 2 arguments- variables 'a'
2063
/// and 'b'.
2064
/// 'omp flush' directive does not have clauses but have an optional list of
2065
/// variables to flush. This list of variables is stored within some fake clause
2066
/// FlushClause.
2067
class OMPFlushDirective : public OMPExecutableDirective {
2068
  friend class ASTStmtReader;
2069
  /// Build directive with the given start and end location.
2070
  ///
2071
  /// \param StartLoc Starting location of the directive kind.
2072
  /// \param EndLoc Ending location of the directive.
2073
  /// \param NumClauses Number of clauses.
2074
  ///
2075
  OMPFlushDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2076
                    unsigned NumClauses)
2077
      : OMPExecutableDirective(this, OMPFlushDirectiveClass, OMPD_flush,
2078
14
                               StartLoc, EndLoc, NumClauses, 0) {}
2079
2080
  /// Build an empty directive.
2081
  ///
2082
  /// \param NumClauses Number of clauses.
2083
  ///
2084
  explicit OMPFlushDirective(unsigned NumClauses)
2085
      : OMPExecutableDirective(this, OMPFlushDirectiveClass, OMPD_flush,
2086
                               SourceLocation(), SourceLocation(), NumClauses,
2087
8
                               0) {}
2088
2089
public:
2090
  /// Creates directive with a list of \a Clauses.
2091
  ///
2092
  /// \param C AST context.
2093
  /// \param StartLoc Starting location of the directive kind.
2094
  /// \param EndLoc Ending Location of the directive.
2095
  /// \param Clauses List of clauses (only single OMPFlushClause clause is
2096
  /// allowed).
2097
  ///
2098
  static OMPFlushDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2099
                                   SourceLocation EndLoc,
2100
                                   ArrayRef<OMPClause *> Clauses);
2101
2102
  /// Creates an empty directive with the place for \a NumClauses
2103
  /// clauses.
2104
  ///
2105
  /// \param C AST context.
2106
  /// \param NumClauses Number of clauses.
2107
  ///
2108
  static OMPFlushDirective *CreateEmpty(const ASTContext &C,
2109
                                        unsigned NumClauses, EmptyShell);
2110
2111
274
  static bool classof(const Stmt *T) {
2112
274
    return T->getStmtClass() == OMPFlushDirectiveClass;
2113
274
  }
2114
};
2115
2116
/// This represents '#pragma omp ordered' directive.
2117
///
2118
/// \code
2119
/// #pragma omp ordered
2120
/// \endcode
2121
///
2122
class OMPOrderedDirective : public OMPExecutableDirective {
2123
  friend class ASTStmtReader;
2124
  /// Build directive with the given start and end location.
2125
  ///
2126
  /// \param StartLoc Starting location of the directive kind.
2127
  /// \param EndLoc Ending location of the directive.
2128
  /// \param NumClauses Number of clauses.
2129
  ///
2130
  OMPOrderedDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2131
                      unsigned NumClauses)
2132
      : OMPExecutableDirective(this, OMPOrderedDirectiveClass, OMPD_ordered,
2133
79
                               StartLoc, EndLoc, NumClauses, 1) {}
2134
2135
  /// Build an empty directive.
2136
  ///
2137
  /// \param NumClauses Number of clauses.
2138
  ///
2139
  explicit OMPOrderedDirective(unsigned NumClauses)
2140
      : OMPExecutableDirective(this, OMPOrderedDirectiveClass, OMPD_ordered,
2141
                               SourceLocation(), SourceLocation(), NumClauses,
2142
6
                               1) {}
2143
2144
public:
2145
  /// Creates directive.
2146
  ///
2147
  /// \param C AST context.
2148
  /// \param StartLoc Starting location of the directive kind.
2149
  /// \param EndLoc Ending Location of the directive.
2150
  /// \param Clauses List of clauses.
2151
  /// \param AssociatedStmt Statement, associated with the directive.
2152
  ///
2153
  static OMPOrderedDirective *
2154
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2155
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2156
2157
  /// Creates an empty directive.
2158
  ///
2159
  /// \param C AST context.
2160
  /// \param NumClauses Number of clauses.
2161
  ///
2162
  static OMPOrderedDirective *CreateEmpty(const ASTContext &C,
2163
                                          unsigned NumClauses, EmptyShell);
2164
2165
  static bool classof(const Stmt *T) {
2166
    return T->getStmtClass() == OMPOrderedDirectiveClass;
2167
  }
2168
};
2169
2170
/// This represents '#pragma omp atomic' directive.
2171
///
2172
/// \code
2173
/// #pragma omp atomic capture
2174
/// \endcode
2175
/// In this example directive '#pragma omp atomic' has clause 'capture'.
2176
///
2177
class OMPAtomicDirective : public OMPExecutableDirective {
2178
  friend class ASTStmtReader;
2179
  /// Used for 'atomic update' or 'atomic capture' constructs. They may
2180
  /// have atomic expressions of forms
2181
  /// \code
2182
  /// x = x binop expr;
2183
  /// x = expr binop x;
2184
  /// \endcode
2185
  /// This field is true for the first form of the expression and false for the
2186
  /// second. Required for correct codegen of non-associative operations (like
2187
  /// << or >>).
2188
  bool IsXLHSInRHSPart;
2189
  /// Used for 'atomic update' or 'atomic capture' constructs. They may
2190
  /// have atomic expressions of forms
2191
  /// \code
2192
  /// v = x; <update x>;
2193
  /// <update x>; v = x;
2194
  /// \endcode
2195
  /// This field is true for the first(postfix) form of the expression and false
2196
  /// otherwise.
2197
  bool IsPostfixUpdate;
2198
2199
  /// Build directive with the given start and end location.
2200
  ///
2201
  /// \param StartLoc Starting location of the directive kind.
2202
  /// \param EndLoc Ending location of the directive.
2203
  /// \param NumClauses Number of clauses.
2204
  ///
2205
  OMPAtomicDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2206
                     unsigned NumClauses)
2207
      : OMPExecutableDirective(this, OMPAtomicDirectiveClass, OMPD_atomic,
2208
                               StartLoc, EndLoc, NumClauses, 5),
2209
186
        IsXLHSInRHSPart(false), IsPostfixUpdate(false) {}
2210
2211
  /// Build an empty directive.
2212
  ///
2213
  /// \param NumClauses Number of clauses.
2214
  ///
2215
  explicit OMPAtomicDirective(unsigned NumClauses)
2216
      : OMPExecutableDirective(this, OMPAtomicDirectiveClass, OMPD_atomic,
2217
                               SourceLocation(), SourceLocation(), NumClauses,
2218
                               5),
2219
72
        IsXLHSInRHSPart(false), IsPostfixUpdate(false) {}
2220
2221
  /// Set 'x' part of the associated expression/statement.
2222
258
  void setX(Expr *X) { *std::next(child_begin()) = X; }
2223
  /// Set helper expression of the form
2224
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
2225
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2226
258
  void setUpdateExpr(Expr *UE) { *std::next(child_begin(), 2) = UE; }
2227
  /// Set 'v' part of the associated expression/statement.
2228
258
  void setV(Expr *V) { *std::next(child_begin(), 3) = V; }
2229
  /// Set 'expr' part of the associated expression/statement.
2230
258
  void setExpr(Expr *E) { *std::next(child_begin(), 4) = E; }
2231
2232
public:
2233
  /// Creates directive with a list of \a Clauses and 'x', 'v' and 'expr'
2234
  /// parts of the atomic construct (see Section 2.12.6, atomic Construct, for
2235
  /// detailed description of 'x', 'v' and 'expr').
2236
  ///
2237
  /// \param C AST context.
2238
  /// \param StartLoc Starting location of the directive kind.
2239
  /// \param EndLoc Ending Location of the directive.
2240
  /// \param Clauses List of clauses.
2241
  /// \param AssociatedStmt Statement, associated with the directive.
2242
  /// \param X 'x' part of the associated expression/statement.
2243
  /// \param V 'v' part of the associated expression/statement.
2244
  /// \param E 'expr' part of the associated expression/statement.
2245
  /// \param UE Helper expression of the form
2246
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
2247
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2248
  /// \param IsXLHSInRHSPart true if \a UE has the first form and false if the
2249
  /// second.
2250
  /// \param IsPostfixUpdate true if original value of 'x' must be stored in
2251
  /// 'v', not an updated one.
2252
  static OMPAtomicDirective *
2253
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2254
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V,
2255
         Expr *E, Expr *UE, bool IsXLHSInRHSPart, bool IsPostfixUpdate);
2256
2257
  /// Creates an empty directive with the place for \a NumClauses
2258
  /// clauses.
2259
  ///
2260
  /// \param C AST context.
2261
  /// \param NumClauses Number of clauses.
2262
  ///
2263
  static OMPAtomicDirective *CreateEmpty(const ASTContext &C,
2264
                                         unsigned NumClauses, EmptyShell);
2265
2266
  /// Get 'x' part of the associated expression/statement.
2267
72
  Expr *getX() { return cast_or_null<Expr>(*std::next(child_begin())); }
2268
48
  const Expr *getX() const {
2269
48
    return cast_or_null<Expr>(*std::next(child_begin()));
2270
48
  }
2271
  /// Get helper expression of the form
2272
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
2273
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2274
72
  Expr *getUpdateExpr() {
2275
72
    return cast_or_null<Expr>(*std::next(child_begin(), 2));
2276
72
  }
2277
48
  const Expr *getUpdateExpr() const {
2278
48
    return cast_or_null<Expr>(*std::next(child_begin(), 2));
2279
48
  }
2280
  /// Return true if helper update expression has form
2281
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and false if it has form
2282
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2283
120
  bool isXLHSInRHSPart() const { return IsXLHSInRHSPart; }
2284
  /// Return true if 'v' expression must be updated to original value of
2285
  /// 'x', false if 'v' must be updated to the new value of 'x'.
2286
120
  bool isPostfixUpdate() const { return IsPostfixUpdate; }
2287
  /// Get 'v' part of the associated expression/statement.
2288
72
  Expr *getV() { return cast_or_null<Expr>(*std::next(child_begin(), 3)); }
2289
48
  const Expr *getV() const {
2290
48
    return cast_or_null<Expr>(*std::next(child_begin(), 3));
2291
48
  }
2292
  /// Get 'expr' part of the associated expression/statement.
2293
72
  Expr *getExpr() { return cast_or_null<Expr>(*std::next(child_begin(), 4)); }
2294
48
  const Expr *getExpr() const {
2295
48
    return cast_or_null<Expr>(*std::next(child_begin(), 4));
2296
48
  }
2297
2298
  static bool classof(const Stmt *T) {
2299
    return T->getStmtClass() == OMPAtomicDirectiveClass;
2300
  }
2301
};
2302
2303
/// This represents '#pragma omp target' directive.
2304
///
2305
/// \code
2306
/// #pragma omp target if(a)
2307
/// \endcode
2308
/// In this example directive '#pragma omp target' has clause 'if' with
2309
/// condition 'a'.
2310
///
2311
class OMPTargetDirective : public OMPExecutableDirective {
2312
  friend class ASTStmtReader;
2313
  /// Build directive with the given start and end location.
2314
  ///
2315
  /// \param StartLoc Starting location of the directive kind.
2316
  /// \param EndLoc Ending location of the directive.
2317
  /// \param NumClauses Number of clauses.
2318
  ///
2319
  OMPTargetDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2320
                     unsigned NumClauses)
2321
      : OMPExecutableDirective(this, OMPTargetDirectiveClass, OMPD_target,
2322
4.58k
                               StartLoc, EndLoc, NumClauses, 1) {}
2323
2324
  /// Build an empty directive.
2325
  ///
2326
  /// \param NumClauses Number of clauses.
2327
  ///
2328
  explicit OMPTargetDirective(unsigned NumClauses)
2329
      : OMPExecutableDirective(this, OMPTargetDirectiveClass, OMPD_target,
2330
                               SourceLocation(), SourceLocation(), NumClauses,
2331
387
                               1) {}
2332
2333
public:
2334
  /// Creates directive with a list of \a Clauses.
2335
  ///
2336
  /// \param C AST context.
2337
  /// \param StartLoc Starting location of the directive kind.
2338
  /// \param EndLoc Ending Location of the directive.
2339
  /// \param Clauses List of clauses.
2340
  /// \param AssociatedStmt Statement, associated with the directive.
2341
  ///
2342
  static OMPTargetDirective *
2343
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2344
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2345
2346
  /// Creates an empty directive with the place for \a NumClauses
2347
  /// clauses.
2348
  ///
2349
  /// \param C AST context.
2350
  /// \param NumClauses Number of clauses.
2351
  ///
2352
  static OMPTargetDirective *CreateEmpty(const ASTContext &C,
2353
                                         unsigned NumClauses, EmptyShell);
2354
2355
  static bool classof(const Stmt *T) {
2356
    return T->getStmtClass() == OMPTargetDirectiveClass;
2357
  }
2358
};
2359
2360
/// This represents '#pragma omp target data' directive.
2361
///
2362
/// \code
2363
/// #pragma omp target data device(0) if(a) map(b[:])
2364
/// \endcode
2365
/// In this example directive '#pragma omp target data' has clauses 'device'
2366
/// with the value '0', 'if' with condition 'a' and 'map' with array
2367
/// section 'b[:]'.
2368
///
2369
class OMPTargetDataDirective : public OMPExecutableDirective {
2370
  friend class ASTStmtReader;
2371
  /// Build directive with the given start and end location.
2372
  ///
2373
  /// \param StartLoc Starting location of the directive kind.
2374
  /// \param EndLoc Ending Location of the directive.
2375
  /// \param NumClauses The number of clauses.
2376
  ///
2377
  OMPTargetDataDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2378
                         unsigned NumClauses)
2379
      : OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
2380
                               OMPD_target_data, StartLoc, EndLoc, NumClauses,
2381
321
                               1) {}
2382
2383
  /// Build an empty directive.
2384
  ///
2385
  /// \param NumClauses Number of clauses.
2386
  ///
2387
  explicit OMPTargetDataDirective(unsigned NumClauses)
2388
      : OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
2389
                               OMPD_target_data, SourceLocation(),
2390
47
                               SourceLocation(), NumClauses, 1) {}
2391
2392
public:
2393
  /// Creates directive with a list of \a Clauses.
2394
  ///
2395
  /// \param C AST context.
2396
  /// \param StartLoc Starting location of the directive kind.
2397
  /// \param EndLoc Ending Location of the directive.
2398
  /// \param Clauses List of clauses.
2399
  /// \param AssociatedStmt Statement, associated with the directive.
2400
  ///
2401
  static OMPTargetDataDirective *
2402
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2403
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2404
2405
  /// Creates an empty directive with the place for \a N clauses.
2406
  ///
2407
  /// \param C AST context.
2408
  /// \param N The number of clauses.
2409
  ///
2410
  static OMPTargetDataDirective *CreateEmpty(const ASTContext &C, unsigned N,
2411
                                             EmptyShell);
2412
2413
  static bool classof(const Stmt *T) {
2414
    return T->getStmtClass() == OMPTargetDataDirectiveClass;
2415
  }
2416
};
2417
2418
/// This represents '#pragma omp target enter data' directive.
2419
///
2420
/// \code
2421
/// #pragma omp target enter data device(0) if(a) map(b[:])
2422
/// \endcode
2423
/// In this example directive '#pragma omp target enter data' has clauses
2424
/// 'device' with the value '0', 'if' with condition 'a' and 'map' with array
2425
/// section 'b[:]'.
2426
///
2427
class OMPTargetEnterDataDirective : public OMPExecutableDirective {
2428
  friend class ASTStmtReader;
2429
  /// Build directive with the given start and end location.
2430
  ///
2431
  /// \param StartLoc Starting location of the directive kind.
2432
  /// \param EndLoc Ending Location of the directive.
2433
  /// \param NumClauses The number of clauses.
2434
  ///
2435
  OMPTargetEnterDataDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2436
                              unsigned NumClauses)
2437
      : OMPExecutableDirective(this, OMPTargetEnterDataDirectiveClass,
2438
                               OMPD_target_enter_data, StartLoc, EndLoc,
2439
29
                               NumClauses, /*NumChildren=*/1) {}
2440
2441
  /// Build an empty directive.
2442
  ///
2443
  /// \param NumClauses Number of clauses.
2444
  ///
2445
  explicit OMPTargetEnterDataDirective(unsigned NumClauses)
2446
      : OMPExecutableDirective(this, OMPTargetEnterDataDirectiveClass,
2447
                               OMPD_target_enter_data, SourceLocation(),
2448
                               SourceLocation(), NumClauses,
2449
12
                               /*NumChildren=*/1) {}
2450
2451
public:
2452
  /// Creates directive with a list of \a Clauses.
2453
  ///
2454
  /// \param C AST context.
2455
  /// \param StartLoc Starting location of the directive kind.
2456
  /// \param EndLoc Ending Location of the directive.
2457
  /// \param Clauses List of clauses.
2458
  /// \param AssociatedStmt Statement, associated with the directive.
2459
  ///
2460
  static OMPTargetEnterDataDirective *
2461
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2462
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2463
2464
  /// Creates an empty directive with the place for \a N clauses.
2465
  ///
2466
  /// \param C AST context.
2467
  /// \param N The number of clauses.
2468
  ///
2469
  static OMPTargetEnterDataDirective *CreateEmpty(const ASTContext &C,
2470
                                                  unsigned N, EmptyShell);
2471
2472
24.1k
  static bool classof(const Stmt *T) {
2473
24.1k
    return T->getStmtClass() == OMPTargetEnterDataDirectiveClass;
2474
24.1k
  }
2475
};
2476
2477
/// This represents '#pragma omp target exit data' directive.
2478
///
2479
/// \code
2480
/// #pragma omp target exit data device(0) if(a) map(b[:])
2481
/// \endcode
2482
/// In this example directive '#pragma omp target exit data' has clauses
2483
/// 'device' with the value '0', 'if' with condition 'a' and 'map' with array
2484
/// section 'b[:]'.
2485
///
2486
class OMPTargetExitDataDirective : public OMPExecutableDirective {
2487
  friend class ASTStmtReader;
2488
  /// Build directive with the given start and end location.
2489
  ///
2490
  /// \param StartLoc Starting location of the directive kind.
2491
  /// \param EndLoc Ending Location of the directive.
2492
  /// \param NumClauses The number of clauses.
2493
  ///
2494
  OMPTargetExitDataDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2495
                             unsigned NumClauses)
2496
      : OMPExecutableDirective(this, OMPTargetExitDataDirectiveClass,
2497
                               OMPD_target_exit_data, StartLoc, EndLoc,
2498
134
                               NumClauses, /*NumChildren=*/1) {}
2499
2500
  /// Build an empty directive.
2501
  ///
2502
  /// \param NumClauses Number of clauses.
2503
  ///
2504
  explicit OMPTargetExitDataDirective(unsigned NumClauses)
2505
      : OMPExecutableDirective(this, OMPTargetExitDataDirectiveClass,
2506
                               OMPD_target_exit_data, SourceLocation(),
2507
                               SourceLocation(), NumClauses,
2508
8
                               /*NumChildren=*/1) {}
2509
2510
public:
2511
  /// Creates directive with a list of \a Clauses.
2512
  ///
2513
  /// \param C AST context.
2514
  /// \param StartLoc Starting location of the directive kind.
2515
  /// \param EndLoc Ending Location of the directive.
2516
  /// \param Clauses List of clauses.
2517
  /// \param AssociatedStmt Statement, associated with the directive.
2518
  ///
2519
  static OMPTargetExitDataDirective *
2520
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2521
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2522
2523
  /// Creates an empty directive with the place for \a N clauses.
2524
  ///
2525
  /// \param C AST context.
2526
  /// \param N The number of clauses.
2527
  ///
2528
  static OMPTargetExitDataDirective *CreateEmpty(const ASTContext &C,
2529
                                                 unsigned N, EmptyShell);
2530
2531
24.1k
  static bool classof(const Stmt *T) {
2532
24.1k
    return T->getStmtClass() == OMPTargetExitDataDirectiveClass;
2533
24.1k
  }
2534
};
2535
2536
/// This represents '#pragma omp target parallel' directive.
2537
///
2538
/// \code
2539
/// #pragma omp target parallel if(a)
2540
/// \endcode
2541
/// In this example directive '#pragma omp target parallel' has clause 'if' with
2542
/// condition 'a'.
2543
///
2544
class OMPTargetParallelDirective : public OMPExecutableDirective {
2545
  friend class ASTStmtReader;
2546
  /// Build directive with the given start and end location.
2547
  ///
2548
  /// \param StartLoc Starting location of the directive kind.
2549
  /// \param EndLoc Ending location of the directive.
2550
  /// \param NumClauses Number of clauses.
2551
  ///
2552
  OMPTargetParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2553
                             unsigned NumClauses)
2554
      : OMPExecutableDirective(this, OMPTargetParallelDirectiveClass,
2555
                               OMPD_target_parallel, StartLoc, EndLoc,
2556
802
                               NumClauses, /*NumChildren=*/1) {}
2557
2558
  /// Build an empty directive.
2559
  ///
2560
  /// \param NumClauses Number of clauses.
2561
  ///
2562
  explicit OMPTargetParallelDirective(unsigned NumClauses)
2563
      : OMPExecutableDirective(this, OMPTargetParallelDirectiveClass,
2564
                               OMPD_target_parallel, SourceLocation(),
2565
                               SourceLocation(), NumClauses,
2566
86
                               /*NumChildren=*/1) {}
2567
2568
public:
2569
  /// Creates directive with a list of \a Clauses.
2570
  ///
2571
  /// \param C AST context.
2572
  /// \param StartLoc Starting location of the directive kind.
2573
  /// \param EndLoc Ending Location of the directive.
2574
  /// \param Clauses List of clauses.
2575
  /// \param AssociatedStmt Statement, associated with the directive.
2576
  ///
2577
  static OMPTargetParallelDirective *
2578
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2579
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2580
2581
  /// Creates an empty directive with the place for \a NumClauses
2582
  /// clauses.
2583
  ///
2584
  /// \param C AST context.
2585
  /// \param NumClauses Number of clauses.
2586
  ///
2587
  static OMPTargetParallelDirective *
2588
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2589
2590
  static bool classof(const Stmt *T) {
2591
    return T->getStmtClass() == OMPTargetParallelDirectiveClass;
2592
  }
2593
};
2594
2595
/// This represents '#pragma omp target parallel for' directive.
2596
///
2597
/// \code
2598
/// #pragma omp target parallel for private(a,b) reduction(+:c,d)
2599
/// \endcode
2600
/// In this example directive '#pragma omp target parallel for' has clauses
2601
/// 'private' with the variables 'a' and 'b' and 'reduction' with operator '+'
2602
/// and variables 'c' and 'd'.
2603
///
2604
class OMPTargetParallelForDirective : public OMPLoopDirective {
2605
  friend class ASTStmtReader;
2606
2607
  /// true if current region has inner cancel directive.
2608
  bool HasCancel;
2609
2610
  /// Build directive with the given start and end location.
2611
  ///
2612
  /// \param StartLoc Starting location of the directive kind.
2613
  /// \param EndLoc Ending location of the directive.
2614
  /// \param CollapsedNum Number of collapsed nested loops.
2615
  /// \param NumClauses Number of clauses.
2616
  ///
2617
  OMPTargetParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2618
                                unsigned CollapsedNum, unsigned NumClauses)
2619
      : OMPLoopDirective(this, OMPTargetParallelForDirectiveClass,
2620
                         OMPD_target_parallel_for, StartLoc, EndLoc,
2621
                         CollapsedNum, NumClauses),
2622
473
        HasCancel(false) {}
2623
2624
  /// Build an empty directive.
2625
  ///
2626
  /// \param CollapsedNum Number of collapsed nested loops.
2627
  /// \param NumClauses Number of clauses.
2628
  ///
2629
  explicit OMPTargetParallelForDirective(unsigned CollapsedNum,
2630
                                         unsigned NumClauses)
2631
      : OMPLoopDirective(this, OMPTargetParallelForDirectiveClass,
2632
                         OMPD_target_parallel_for, SourceLocation(),
2633
                         SourceLocation(), CollapsedNum, NumClauses),
2634
78
        HasCancel(false) {}
2635
2636
  /// Set cancel state.
2637
551
  void setHasCancel(bool Has) { HasCancel = Has; }
2638
2639
public:
2640
  /// Creates directive with a list of \a Clauses.
2641
  ///
2642
  /// \param C AST context.
2643
  /// \param StartLoc Starting location of the directive kind.
2644
  /// \param EndLoc Ending Location of the directive.
2645
  /// \param CollapsedNum Number of collapsed loops.
2646
  /// \param Clauses List of clauses.
2647
  /// \param AssociatedStmt Statement, associated with the directive.
2648
  /// \param Exprs Helper expressions for CodeGen.
2649
  /// \param HasCancel true if current directive has inner cancel directive.
2650
  ///
2651
  static OMPTargetParallelForDirective *
2652
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2653
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2654
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
2655
2656
  /// Creates an empty directive with the place
2657
  /// for \a NumClauses clauses.
2658
  ///
2659
  /// \param C AST context.
2660
  /// \param CollapsedNum Number of collapsed nested loops.
2661
  /// \param NumClauses Number of clauses.
2662
  ///
2663
  static OMPTargetParallelForDirective *CreateEmpty(const ASTContext &C,
2664
                                                    unsigned NumClauses,
2665
                                                    unsigned CollapsedNum,
2666
                                                    EmptyShell);
2667
2668
  /// Return true if current directive has inner cancel directive.
2669
151
  bool hasCancel() const { return HasCancel; }
2670
2671
1.12k
  static bool classof(const Stmt *T) {
2672
1.12k
    return T->getStmtClass() == OMPTargetParallelForDirectiveClass;
2673
1.12k
  }
2674
};
2675
2676
/// This represents '#pragma omp teams' directive.
2677
///
2678
/// \code
2679
/// #pragma omp teams if(a)
2680
/// \endcode
2681
/// In this example directive '#pragma omp teams' has clause 'if' with
2682
/// condition 'a'.
2683
///
2684
class OMPTeamsDirective : public OMPExecutableDirective {
2685
  friend class ASTStmtReader;
2686
  /// Build directive with the given start and end location.
2687
  ///
2688
  /// \param StartLoc Starting location of the directive kind.
2689
  /// \param EndLoc Ending location of the directive.
2690
  /// \param NumClauses Number of clauses.
2691
  ///
2692
  OMPTeamsDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2693
                    unsigned NumClauses)
2694
      : OMPExecutableDirective(this, OMPTeamsDirectiveClass, OMPD_teams,
2695
2.25k
                               StartLoc, EndLoc, NumClauses, 1) {}
2696
2697
  /// Build an empty directive.
2698
  ///
2699
  /// \param NumClauses Number of clauses.
2700
  ///
2701
  explicit OMPTeamsDirective(unsigned NumClauses)
2702
      : OMPExecutableDirective(this, OMPTeamsDirectiveClass, OMPD_teams,
2703
                               SourceLocation(), SourceLocation(), NumClauses,
2704
109
                               1) {}
2705
2706
public:
2707
  /// Creates directive with a list of \a Clauses.
2708
  ///
2709
  /// \param C AST context.
2710
  /// \param StartLoc Starting location of the directive kind.
2711
  /// \param EndLoc Ending Location of the directive.
2712
  /// \param Clauses List of clauses.
2713
  /// \param AssociatedStmt Statement, associated with the directive.
2714
  ///
2715
  static OMPTeamsDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2716
                                   SourceLocation EndLoc,
2717
                                   ArrayRef<OMPClause *> Clauses,
2718
                                   Stmt *AssociatedStmt);
2719
2720
  /// Creates an empty directive with the place for \a NumClauses
2721
  /// clauses.
2722
  ///
2723
  /// \param C AST context.
2724
  /// \param NumClauses Number of clauses.
2725
  ///
2726
  static OMPTeamsDirective *CreateEmpty(const ASTContext &C,
2727
                                        unsigned NumClauses, EmptyShell);
2728
2729
  static bool classof(const Stmt *T) {
2730
    return T->getStmtClass() == OMPTeamsDirectiveClass;
2731
  }
2732
};
2733
2734
/// This represents '#pragma omp cancellation point' directive.
2735
///
2736
/// \code
2737
/// #pragma omp cancellation point for
2738
/// \endcode
2739
///
2740
/// In this example a cancellation point is created for innermost 'for' region.
2741
class OMPCancellationPointDirective : public OMPExecutableDirective {
2742
  friend class ASTStmtReader;
2743
  OpenMPDirectiveKind CancelRegion;
2744
  /// Build directive with the given start and end location.
2745
  ///
2746
  /// \param StartLoc Starting location of the directive kind.
2747
  /// \param EndLoc Ending location of the directive.
2748
  ///
2749
  OMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2750
      : OMPExecutableDirective(this, OMPCancellationPointDirectiveClass,
2751
                               OMPD_cancellation_point, StartLoc, EndLoc, 0, 0),
2752
4
        CancelRegion(OMPD_unknown) {}
2753
2754
  /// Build an empty directive.
2755
  ///
2756
  explicit OMPCancellationPointDirective()
2757
      : OMPExecutableDirective(this, OMPCancellationPointDirectiveClass,
2758
                               OMPD_cancellation_point, SourceLocation(),
2759
                               SourceLocation(), 0, 0),
2760
4
        CancelRegion(OMPD_unknown) {}
2761
2762
  /// Set cancel region for current cancellation point.
2763
  /// \param CR Cancellation region.
2764
8
  void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; }
2765
2766
public:
2767
  /// Creates directive.
2768
  ///
2769
  /// \param C AST context.
2770
  /// \param StartLoc Starting location of the directive kind.
2771
  /// \param EndLoc Ending Location of the directive.
2772
  ///
2773
  static OMPCancellationPointDirective *
2774
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2775
         OpenMPDirectiveKind CancelRegion);
2776
2777
  /// Creates an empty directive.
2778
  ///
2779
  /// \param C AST context.
2780
  ///
2781
  static OMPCancellationPointDirective *CreateEmpty(const ASTContext &C,
2782
                                                    EmptyShell);
2783
2784
  /// Get cancellation region for the current cancellation point.
2785
7
  OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; }
2786
2787
  static bool classof(const Stmt *T) {
2788
    return T->getStmtClass() == OMPCancellationPointDirectiveClass;
2789
  }
2790
};
2791
2792
/// This represents '#pragma omp cancel' directive.
2793
///
2794
/// \code
2795
/// #pragma omp cancel for
2796
/// \endcode
2797
///
2798
/// In this example a cancel is created for innermost 'for' region.
2799
class OMPCancelDirective : public OMPExecutableDirective {
2800
  friend class ASTStmtReader;
2801
  OpenMPDirectiveKind CancelRegion;
2802
  /// Build directive with the given start and end location.
2803
  ///
2804
  /// \param StartLoc Starting location of the directive kind.
2805
  /// \param EndLoc Ending location of the directive.
2806
  /// \param NumClauses Number of clauses.
2807
  ///
2808
  OMPCancelDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2809
                     unsigned NumClauses)
2810
      : OMPExecutableDirective(this, OMPCancelDirectiveClass, OMPD_cancel,
2811
                               StartLoc, EndLoc, NumClauses, 0),
2812
23
        CancelRegion(OMPD_unknown) {}
2813
2814
  /// Build an empty directive.
2815
  ///
2816
  /// \param NumClauses Number of clauses.
2817
  explicit OMPCancelDirective(unsigned NumClauses)
2818
      : OMPExecutableDirective(this, OMPCancelDirectiveClass, OMPD_cancel,
2819
                               SourceLocation(), SourceLocation(), NumClauses,
2820
                               0),
2821
4
        CancelRegion(OMPD_unknown) {}
2822
2823
  /// Set cancel region for current cancellation point.
2824
  /// \param CR Cancellation region.
2825
27
  void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; }
2826
2827
public:
2828
  /// Creates directive.
2829
  ///
2830
  /// \param C AST context.
2831
  /// \param StartLoc Starting location of the directive kind.
2832
  /// \param EndLoc Ending Location of the directive.
2833
  /// \param Clauses List of clauses.
2834
  ///
2835
  static OMPCancelDirective *
2836
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2837
         ArrayRef<OMPClause *> Clauses, OpenMPDirectiveKind CancelRegion);
2838
2839
  /// Creates an empty directive.
2840
  ///
2841
  /// \param C AST context.
2842
  /// \param NumClauses Number of clauses.
2843
  ///
2844
  static OMPCancelDirective *CreateEmpty(const ASTContext &C,
2845
                                         unsigned NumClauses, EmptyShell);
2846
2847
  /// Get cancellation region for the current cancellation point.
2848
20
  OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; }
2849
2850
  static bool classof(const Stmt *T) {
2851
    return T->getStmtClass() == OMPCancelDirectiveClass;
2852
  }
2853
};
2854
2855
/// This represents '#pragma omp taskloop' directive.
2856
///
2857
/// \code
2858
/// #pragma omp taskloop private(a,b) grainsize(val) num_tasks(num)
2859
/// \endcode
2860
/// In this example directive '#pragma omp taskloop' has clauses 'private'
2861
/// with the variables 'a' and 'b', 'grainsize' with expression 'val' and
2862
/// 'num_tasks' with expression 'num'.
2863
///
2864
class OMPTaskLoopDirective : public OMPLoopDirective {
2865
  friend class ASTStmtReader;
2866
  /// Build directive with the given start and end location.
2867
  ///
2868
  /// \param StartLoc Starting location of the directive kind.
2869
  /// \param EndLoc Ending location of the directive.
2870
  /// \param CollapsedNum Number of collapsed nested loops.
2871
  /// \param NumClauses Number of clauses.
2872
  ///
2873
  OMPTaskLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2874
                       unsigned CollapsedNum, unsigned NumClauses)
2875
      : OMPLoopDirective(this, OMPTaskLoopDirectiveClass, OMPD_taskloop,
2876
408
                         StartLoc, EndLoc, CollapsedNum, NumClauses) {}
2877
2878
  /// Build an empty directive.
2879
  ///
2880
  /// \param CollapsedNum Number of collapsed nested loops.
2881
  /// \param NumClauses Number of clauses.
2882
  ///
2883
  explicit OMPTaskLoopDirective(unsigned CollapsedNum, unsigned NumClauses)
2884
      : OMPLoopDirective(this, OMPTaskLoopDirectiveClass, OMPD_taskloop,
2885
                         SourceLocation(), SourceLocation(), CollapsedNum,
2886
3
                         NumClauses) {}
2887
2888
public:
2889
  /// Creates directive with a list of \a Clauses.
2890
  ///
2891
  /// \param C AST context.
2892
  /// \param StartLoc Starting location of the directive kind.
2893
  /// \param EndLoc Ending Location of the directive.
2894
  /// \param CollapsedNum Number of collapsed loops.
2895
  /// \param Clauses List of clauses.
2896
  /// \param AssociatedStmt Statement, associated with the directive.
2897
  /// \param Exprs Helper expressions for CodeGen.
2898
  ///
2899
  static OMPTaskLoopDirective *
2900
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2901
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2902
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
2903
2904
  /// Creates an empty directive with the place
2905
  /// for \a NumClauses clauses.
2906
  ///
2907
  /// \param C AST context.
2908
  /// \param CollapsedNum Number of collapsed nested loops.
2909
  /// \param NumClauses Number of clauses.
2910
  ///
2911
  static OMPTaskLoopDirective *CreateEmpty(const ASTContext &C,
2912
                                           unsigned NumClauses,
2913
                                           unsigned CollapsedNum, EmptyShell);
2914
2915
  static bool classof(const Stmt *T) {
2916
    return T->getStmtClass() == OMPTaskLoopDirectiveClass;
2917
  }
2918
};
2919
2920
/// This represents '#pragma omp taskloop simd' directive.
2921
///
2922
/// \code
2923
/// #pragma omp taskloop simd private(a,b) grainsize(val) num_tasks(num)
2924
/// \endcode
2925
/// In this example directive '#pragma omp taskloop simd' has clauses 'private'
2926
/// with the variables 'a' and 'b', 'grainsize' with expression 'val' and
2927
/// 'num_tasks' with expression 'num'.
2928
///
2929
class OMPTaskLoopSimdDirective : public OMPLoopDirective {
2930
  friend class ASTStmtReader;
2931
  /// Build directive with the given start and end location.
2932
  ///
2933
  /// \param StartLoc Starting location of the directive kind.
2934
  /// \param EndLoc Ending location of the directive.
2935
  /// \param CollapsedNum Number of collapsed nested loops.
2936
  /// \param NumClauses Number of clauses.
2937
  ///
2938
  OMPTaskLoopSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2939
                           unsigned CollapsedNum, unsigned NumClauses)
2940
      : OMPLoopDirective(this, OMPTaskLoopSimdDirectiveClass,
2941
                         OMPD_taskloop_simd, StartLoc, EndLoc, CollapsedNum,
2942
260
                         NumClauses) {}
2943
2944
  /// Build an empty directive.
2945
  ///
2946
  /// \param CollapsedNum Number of collapsed nested loops.
2947
  /// \param NumClauses Number of clauses.
2948
  ///
2949
  explicit OMPTaskLoopSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
2950
      : OMPLoopDirective(this, OMPTaskLoopSimdDirectiveClass,
2951
                         OMPD_taskloop_simd, SourceLocation(), SourceLocation(),
2952
14
                         CollapsedNum, NumClauses) {}
2953
2954
public:
2955
  /// Creates directive with a list of \a Clauses.
2956
  ///
2957
  /// \param C AST context.
2958
  /// \param StartLoc Starting location of the directive kind.
2959
  /// \param EndLoc Ending Location of the directive.
2960
  /// \param CollapsedNum Number of collapsed loops.
2961
  /// \param Clauses List of clauses.
2962
  /// \param AssociatedStmt Statement, associated with the directive.
2963
  /// \param Exprs Helper expressions for CodeGen.
2964
  ///
2965
  static OMPTaskLoopSimdDirective *
2966
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2967
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2968
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
2969
2970
  /// Creates an empty directive with the place
2971
  /// for \a NumClauses clauses.
2972
  ///
2973
  /// \param C AST context.
2974
  /// \param CollapsedNum Number of collapsed nested loops.
2975
  /// \param NumClauses Number of clauses.
2976
  ///
2977
  static OMPTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
2978
                                               unsigned NumClauses,
2979
                                               unsigned CollapsedNum,
2980
                                               EmptyShell);
2981
2982
  static bool classof(const Stmt *T) {
2983
    return T->getStmtClass() == OMPTaskLoopSimdDirectiveClass;
2984
  }
2985
};
2986
2987
/// This represents '#pragma omp distribute' directive.
2988
///
2989
/// \code
2990
/// #pragma omp distribute private(a,b)
2991
/// \endcode
2992
/// In this example directive '#pragma omp distribute' has clauses 'private'
2993
/// with the variables 'a' and 'b'
2994
///
2995
class OMPDistributeDirective : public OMPLoopDirective {
2996
  friend class ASTStmtReader;
2997
2998
  /// Build directive with the given start and end location.
2999
  ///
3000
  /// \param StartLoc Starting location of the directive kind.
3001
  /// \param EndLoc Ending location of the directive.
3002
  /// \param CollapsedNum Number of collapsed nested loops.
3003
  /// \param NumClauses Number of clauses.
3004
  ///
3005
  OMPDistributeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3006
                         unsigned CollapsedNum, unsigned NumClauses)
3007
      : OMPLoopDirective(this, OMPDistributeDirectiveClass, OMPD_distribute,
3008
                         StartLoc, EndLoc, CollapsedNum, NumClauses)
3009
199
        {}
3010
3011
  /// Build an empty directive.
3012
  ///
3013
  /// \param CollapsedNum Number of collapsed nested loops.
3014
  /// \param NumClauses Number of clauses.
3015
  ///
3016
  explicit OMPDistributeDirective(unsigned CollapsedNum, unsigned NumClauses)
3017
      : OMPLoopDirective(this, OMPDistributeDirectiveClass, OMPD_distribute,
3018
                         SourceLocation(), SourceLocation(), CollapsedNum,
3019
                         NumClauses)
3020
13
        {}
3021
3022
public:
3023
  /// Creates directive with a list of \a Clauses.
3024
  ///
3025
  /// \param C AST context.
3026
  /// \param StartLoc Starting location of the directive kind.
3027
  /// \param EndLoc Ending Location of the directive.
3028
  /// \param CollapsedNum Number of collapsed loops.
3029
  /// \param Clauses List of clauses.
3030
  /// \param AssociatedStmt Statement, associated with the directive.
3031
  /// \param Exprs Helper expressions for CodeGen.
3032
  ///
3033
  static OMPDistributeDirective *
3034
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3035
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3036
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3037
3038
  /// Creates an empty directive with the place
3039
  /// for \a NumClauses clauses.
3040
  ///
3041
  /// \param C AST context.
3042
  /// \param CollapsedNum Number of collapsed nested loops.
3043
  /// \param NumClauses Number of clauses.
3044
  ///
3045
  static OMPDistributeDirective *CreateEmpty(const ASTContext &C,
3046
                                             unsigned NumClauses,
3047
                                             unsigned CollapsedNum, EmptyShell);
3048
3049
  static bool classof(const Stmt *T) {
3050
    return T->getStmtClass() == OMPDistributeDirectiveClass;
3051
  }
3052
};
3053
3054
/// This represents '#pragma omp target update' directive.
3055
///
3056
/// \code
3057
/// #pragma omp target update to(a) from(b) device(1)
3058
/// \endcode
3059
/// In this example directive '#pragma omp target update' has clause 'to' with
3060
/// argument 'a', clause 'from' with argument 'b' and clause 'device' with
3061
/// argument '1'.
3062
///
3063
class OMPTargetUpdateDirective : public OMPExecutableDirective {
3064
  friend class ASTStmtReader;
3065
  /// Build directive with the given start and end location.
3066
  ///
3067
  /// \param StartLoc Starting location of the directive kind.
3068
  /// \param EndLoc Ending Location of the directive.
3069
  /// \param NumClauses The number of clauses.
3070
  ///
3071
  OMPTargetUpdateDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3072
                           unsigned NumClauses)
3073
      : OMPExecutableDirective(this, OMPTargetUpdateDirectiveClass,
3074
                               OMPD_target_update, StartLoc, EndLoc, NumClauses,
3075
137
                               1) {}
3076
3077
  /// Build an empty directive.
3078
  ///
3079
  /// \param NumClauses Number of clauses.
3080
  ///
3081
  explicit OMPTargetUpdateDirective(unsigned NumClauses)
3082
      : OMPExecutableDirective(this, OMPTargetUpdateDirectiveClass,
3083
                               OMPD_target_update, SourceLocation(),
3084
8
                               SourceLocation(), NumClauses, 1) {}
3085
3086
public:
3087
  /// Creates directive with a list of \a Clauses.
3088
  ///
3089
  /// \param C AST context.
3090
  /// \param StartLoc Starting location of the directive kind.
3091
  /// \param EndLoc Ending Location of the directive.
3092
  /// \param Clauses List of clauses.
3093
  /// \param AssociatedStmt Statement, associated with the directive.
3094
  ///
3095
  static OMPTargetUpdateDirective *
3096
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3097
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3098
3099
  /// Creates an empty directive with the place for \a NumClauses
3100
  /// clauses.
3101
  ///
3102
  /// \param C AST context.
3103
  /// \param NumClauses The number of clauses.
3104
  ///
3105
  static OMPTargetUpdateDirective *CreateEmpty(const ASTContext &C,
3106
                                               unsigned NumClauses, EmptyShell);
3107
3108
23.9k
  static bool classof(const Stmt *T) {
3109
23.9k
    return T->getStmtClass() == OMPTargetUpdateDirectiveClass;
3110
23.9k
  }
3111
};
3112
3113
/// This represents '#pragma omp distribute parallel for' composite
3114
///  directive.
3115
///
3116
/// \code
3117
/// #pragma omp distribute parallel for private(a,b)
3118
/// \endcode
3119
/// In this example directive '#pragma omp distribute parallel for' has clause
3120
/// 'private' with the variables 'a' and 'b'
3121
///
3122
class OMPDistributeParallelForDirective : public OMPLoopDirective {
3123
  friend class ASTStmtReader;
3124
  /// true if the construct has inner cancel directive.
3125
  bool HasCancel = false;
3126
3127
  /// Build directive with the given start and end location.
3128
  ///
3129
  /// \param StartLoc Starting location of the directive kind.
3130
  /// \param EndLoc Ending location of the directive.
3131
  /// \param CollapsedNum Number of collapsed nested loops.
3132
  /// \param NumClauses Number of clauses.
3133
  ///
3134
  OMPDistributeParallelForDirective(SourceLocation StartLoc,
3135
                                    SourceLocation EndLoc,
3136
                                    unsigned CollapsedNum, unsigned NumClauses)
3137
      : OMPLoopDirective(this, OMPDistributeParallelForDirectiveClass,
3138
                         OMPD_distribute_parallel_for, StartLoc, EndLoc,
3139
563
                         CollapsedNum, NumClauses), HasCancel(false) {}
3140
3141
  /// Build an empty directive.
3142
  ///
3143
  /// \param CollapsedNum Number of collapsed nested loops.
3144
  /// \param NumClauses Number of clauses.
3145
  ///
3146
  explicit OMPDistributeParallelForDirective(unsigned CollapsedNum,
3147
                                             unsigned NumClauses)
3148
      : OMPLoopDirective(this, OMPDistributeParallelForDirectiveClass,
3149
                         OMPD_distribute_parallel_for, SourceLocation(),
3150
                         SourceLocation(), CollapsedNum, NumClauses),
3151
29
        HasCancel(false) {}
3152
3153
  /// Set cancel state.
3154
29
  void setHasCancel(bool Has) { HasCancel = Has; }
3155
3156
public:
3157
  /// Creates directive with a list of \a Clauses.
3158
  ///
3159
  /// \param C AST context.
3160
  /// \param StartLoc Starting location of the directive kind.
3161
  /// \param EndLoc Ending Location of the directive.
3162
  /// \param CollapsedNum Number of collapsed loops.
3163
  /// \param Clauses List of clauses.
3164
  /// \param AssociatedStmt Statement, associated with the directive.
3165
  /// \param Exprs Helper expressions for CodeGen.
3166
  /// \param HasCancel true if this directive has inner cancel directive.
3167
  ///
3168
  static OMPDistributeParallelForDirective *
3169
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3170
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3171
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3172
3173
  /// Creates an empty directive with the place
3174
  /// for \a NumClauses clauses.
3175
  ///
3176
  /// \param C AST context.
3177
  /// \param CollapsedNum Number of collapsed nested loops.
3178
  /// \param NumClauses Number of clauses.
3179
  ///
3180
  static OMPDistributeParallelForDirective *CreateEmpty(const ASTContext &C,
3181
                                                        unsigned NumClauses,
3182
                                                        unsigned CollapsedNum,
3183
                                                        EmptyShell);
3184
3185
  /// Return true if current directive has inner cancel directive.
3186
138
  bool hasCancel() const { return HasCancel; }
3187
3188
1.18k
  static bool classof(const Stmt *T) {
3189
1.18k
    return T->getStmtClass() == OMPDistributeParallelForDirectiveClass;
3190
1.18k
  }
3191
};
3192
3193
/// This represents '#pragma omp distribute parallel for simd' composite
3194
/// directive.
3195
///
3196
/// \code
3197
/// #pragma omp distribute parallel for simd private(x)
3198
/// \endcode
3199
/// In this example directive '#pragma omp distribute parallel for simd' has
3200
/// clause 'private' with the variables 'x'
3201
///
3202
class OMPDistributeParallelForSimdDirective final : public OMPLoopDirective {
3203
  friend class ASTStmtReader;
3204
3205
  /// Build directive with the given start and end location.
3206
  ///
3207
  /// \param StartLoc Starting location of the directive kind.
3208
  /// \param EndLoc Ending location of the directive.
3209
  /// \param CollapsedNum Number of collapsed nested loops.
3210
  /// \param NumClauses Number of clauses.
3211
  ///
3212
  OMPDistributeParallelForSimdDirective(SourceLocation StartLoc,
3213
                                        SourceLocation EndLoc,
3214
                                        unsigned CollapsedNum,
3215
                                        unsigned NumClauses)
3216
      : OMPLoopDirective(this, OMPDistributeParallelForSimdDirectiveClass,
3217
                         OMPD_distribute_parallel_for_simd, StartLoc,
3218
735
                         EndLoc, CollapsedNum, NumClauses) {}
3219
3220
  /// Build an empty directive.
3221
  ///
3222
  /// \param CollapsedNum Number of collapsed nested loops.
3223
  /// \param NumClauses Number of clauses.
3224
  ///
3225
  explicit OMPDistributeParallelForSimdDirective(unsigned CollapsedNum,
3226
                                                 unsigned NumClauses)
3227
      : OMPLoopDirective(this, OMPDistributeParallelForSimdDirectiveClass,
3228
                         OMPD_distribute_parallel_for_simd,
3229
                         SourceLocation(), SourceLocation(), CollapsedNum,
3230
21
                         NumClauses) {}
3231
3232
public:
3233
  /// Creates directive with a list of \a Clauses.
3234
  ///
3235
  /// \param C AST context.
3236
  /// \param StartLoc Starting location of the directive kind.
3237
  /// \param EndLoc Ending Location of the directive.
3238
  /// \param CollapsedNum Number of collapsed loops.
3239
  /// \param Clauses List of clauses.
3240
  /// \param AssociatedStmt Statement, associated with the directive.
3241
  /// \param Exprs Helper expressions for CodeGen.
3242
  ///
3243
  static OMPDistributeParallelForSimdDirective *Create(
3244
      const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3245
      unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3246
      Stmt *AssociatedStmt, const HelperExprs &Exprs);
3247
3248
  /// Creates an empty directive with the place for \a NumClauses clauses.
3249
  ///
3250
  /// \param C AST context.
3251
  /// \param CollapsedNum Number of collapsed nested loops.
3252
  /// \param NumClauses Number of clauses.
3253
  ///
3254
  static OMPDistributeParallelForSimdDirective *CreateEmpty(
3255
      const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
3256
      EmptyShell);
3257
3258
  static bool classof(const Stmt *T) {
3259
    return T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass;
3260
  }
3261
};
3262
3263
/// This represents '#pragma omp distribute simd' composite directive.
3264
///
3265
/// \code
3266
/// #pragma omp distribute simd private(x)
3267
/// \endcode
3268
/// In this example directive '#pragma omp distribute simd' has clause
3269
/// 'private' with the variables 'x'
3270
///
3271
class OMPDistributeSimdDirective final : public OMPLoopDirective {
3272
  friend class ASTStmtReader;
3273
3274
  /// Build directive with the given start and end location.
3275
  ///
3276
  /// \param StartLoc Starting location of the directive kind.
3277
  /// \param EndLoc Ending location of the directive.
3278
  /// \param CollapsedNum Number of collapsed nested loops.
3279
  /// \param NumClauses Number of clauses.
3280
  ///
3281
  OMPDistributeSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3282
                             unsigned CollapsedNum, unsigned NumClauses)
3283
      : OMPLoopDirective(this, OMPDistributeSimdDirectiveClass,
3284
                         OMPD_distribute_simd, StartLoc, EndLoc, CollapsedNum,
3285
335
                         NumClauses) {}
3286
3287
  /// Build an empty directive.
3288
  ///
3289
  /// \param CollapsedNum Number of collapsed nested loops.
3290
  /// \param NumClauses Number of clauses.
3291
  ///
3292
  explicit OMPDistributeSimdDirective(unsigned CollapsedNum,
3293
                                      unsigned NumClauses)
3294
      : OMPLoopDirective(this, OMPDistributeSimdDirectiveClass,
3295
                         OMPD_distribute_simd, SourceLocation(),
3296
26
                         SourceLocation(), CollapsedNum, NumClauses) {}
3297
3298
public:
3299
  /// Creates directive with a list of \a Clauses.
3300
  ///
3301
  /// \param C AST context.
3302
  /// \param StartLoc Starting location of the directive kind.
3303
  /// \param EndLoc Ending Location of the directive.
3304
  /// \param CollapsedNum Number of collapsed loops.
3305
  /// \param Clauses List of clauses.
3306
  /// \param AssociatedStmt Statement, associated with the directive.
3307
  /// \param Exprs Helper expressions for CodeGen.
3308
  ///
3309
  static OMPDistributeSimdDirective *
3310
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3311
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3312
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3313
3314
  /// Creates an empty directive with the place for \a NumClauses clauses.
3315
  ///
3316
  /// \param C AST context.
3317
  /// \param CollapsedNum Number of collapsed nested loops.
3318
  /// \param NumClauses Number of clauses.
3319
  ///
3320
  static OMPDistributeSimdDirective *CreateEmpty(const ASTContext &C,
3321
                                                 unsigned NumClauses,
3322
                                                 unsigned CollapsedNum,
3323
                                                 EmptyShell);
3324
3325
  static bool classof(const Stmt *T) {
3326
    return T->getStmtClass() == OMPDistributeSimdDirectiveClass;
3327
  }
3328
};
3329
3330
/// This represents '#pragma omp target parallel for simd' directive.
3331
///
3332
/// \code
3333
/// #pragma omp target parallel for simd private(a) map(b) safelen(c)
3334
/// \endcode
3335
/// In this example directive '#pragma omp target parallel for simd' has clauses
3336
/// 'private' with the variable 'a', 'map' with the variable 'b' and 'safelen'
3337
/// with the variable 'c'.
3338
///
3339
class OMPTargetParallelForSimdDirective final : public OMPLoopDirective {
3340
  friend class ASTStmtReader;
3341
3342
  /// Build directive with the given start and end location.
3343
  ///
3344
  /// \param StartLoc Starting location of the directive kind.
3345
  /// \param EndLoc Ending location of the directive.
3346
  /// \param CollapsedNum Number of collapsed nested loops.
3347
  /// \param NumClauses Number of clauses.
3348
  ///
3349
  OMPTargetParallelForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3350
                                unsigned CollapsedNum, unsigned NumClauses)
3351
      : OMPLoopDirective(this, OMPTargetParallelForSimdDirectiveClass,
3352
                         OMPD_target_parallel_for_simd, StartLoc, EndLoc,
3353
946
                         CollapsedNum, NumClauses) {}
3354
3355
  /// Build an empty directive.
3356
  ///
3357
  /// \param CollapsedNum Number of collapsed nested loops.
3358
  /// \param NumClauses Number of clauses.
3359
  ///
3360
  explicit OMPTargetParallelForSimdDirective(unsigned CollapsedNum,
3361
                                             unsigned NumClauses)
3362
      : OMPLoopDirective(this, OMPTargetParallelForSimdDirectiveClass,
3363
                         OMPD_target_parallel_for_simd, SourceLocation(),
3364
51
                         SourceLocation(), CollapsedNum, NumClauses) {}
3365
3366
public:
3367
  /// Creates directive with a list of \a Clauses.
3368
  ///
3369
  /// \param C AST context.
3370
  /// \param StartLoc Starting location of the directive kind.
3371
  /// \param EndLoc Ending Location of the directive.
3372
  /// \param CollapsedNum Number of collapsed loops.
3373
  /// \param Clauses List of clauses.
3374
  /// \param AssociatedStmt Statement, associated with the directive.
3375
  /// \param Exprs Helper expressions for CodeGen.
3376
  ///
3377
  static OMPTargetParallelForSimdDirective *
3378
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3379
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3380
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3381
3382
  /// Creates an empty directive with the place for \a NumClauses clauses.
3383
  ///
3384
  /// \param C AST context.
3385
  /// \param CollapsedNum Number of collapsed nested loops.
3386
  /// \param NumClauses Number of clauses.
3387
  ///
3388
  static OMPTargetParallelForSimdDirective *CreateEmpty(const ASTContext &C,
3389
                                                        unsigned NumClauses,
3390
                                                        unsigned CollapsedNum,
3391
                                                        EmptyShell);
3392
3393
  static bool classof(const Stmt *T) {
3394
    return T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass;
3395
  }
3396
};
3397
3398
/// This represents '#pragma omp target simd' directive.
3399
///
3400
/// \code
3401
/// #pragma omp target simd private(a) map(b) safelen(c)
3402
/// \endcode
3403
/// In this example directive '#pragma omp target simd' has clauses 'private'
3404
/// with the variable 'a', 'map' with the variable 'b' and 'safelen' with
3405
/// the variable 'c'.
3406
///
3407
class OMPTargetSimdDirective final : public OMPLoopDirective {
3408
  friend class ASTStmtReader;
3409
3410
  /// Build directive with the given start and end location.
3411
  ///
3412
  /// \param StartLoc Starting location of the directive kind.
3413
  /// \param EndLoc Ending location of the directive.
3414
  /// \param CollapsedNum Number of collapsed nested loops.
3415
  /// \param NumClauses Number of clauses.
3416
  ///
3417
  OMPTargetSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3418
                         unsigned CollapsedNum, unsigned NumClauses)
3419
      : OMPLoopDirective(this, OMPTargetSimdDirectiveClass,
3420
                         OMPD_target_simd, StartLoc, EndLoc, CollapsedNum,
3421
485
                         NumClauses) {}
3422
3423
  /// Build an empty directive.
3424
  ///
3425
  /// \param CollapsedNum Number of collapsed nested loops.
3426
  /// \param NumClauses Number of clauses.
3427
  ///
3428
  explicit OMPTargetSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
3429
      : OMPLoopDirective(this, OMPTargetSimdDirectiveClass, OMPD_target_simd,
3430
                         SourceLocation(),SourceLocation(), CollapsedNum,
3431
39
                         NumClauses) {}
3432
3433
public:
3434
  /// Creates directive with a list of \a Clauses.
3435
  ///
3436
  /// \param C AST context.
3437
  /// \param StartLoc Starting location of the directive kind.
3438
  /// \param EndLoc Ending Location of the directive.
3439
  /// \param CollapsedNum Number of collapsed loops.
3440
  /// \param Clauses List of clauses.
3441
  /// \param AssociatedStmt Statement, associated with the directive.
3442
  /// \param Exprs Helper expressions for CodeGen.
3443
  ///
3444
  static OMPTargetSimdDirective *
3445
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3446
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3447
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3448
3449
  /// Creates an empty directive with the place for \a NumClauses clauses.
3450
  ///
3451
  /// \param C AST context.
3452
  /// \param CollapsedNum Number of collapsed nested loops.
3453
  /// \param NumClauses Number of clauses.
3454
  ///
3455
  static OMPTargetSimdDirective *CreateEmpty(const ASTContext &C,
3456
                                             unsigned NumClauses,
3457
                                             unsigned CollapsedNum,
3458
                                             EmptyShell);
3459
3460
  static bool classof(const Stmt *T) {
3461
    return T->getStmtClass() == OMPTargetSimdDirectiveClass;
3462
  }
3463
};
3464
3465
/// This represents '#pragma omp teams distribute' directive.
3466
///
3467
/// \code
3468
/// #pragma omp teams distribute private(a,b)
3469
/// \endcode
3470
/// In this example directive '#pragma omp teams distribute' has clauses
3471
/// 'private' with the variables 'a' and 'b'
3472
///
3473
class OMPTeamsDistributeDirective final : public OMPLoopDirective {
3474
  friend class ASTStmtReader;
3475
3476
  /// Build directive with the given start and end location.
3477
  ///
3478
  /// \param StartLoc Starting location of the directive kind.
3479
  /// \param EndLoc Ending location of the directive.
3480
  /// \param CollapsedNum Number of collapsed nested loops.
3481
  /// \param NumClauses Number of clauses.
3482
  ///
3483
  OMPTeamsDistributeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3484
                              unsigned CollapsedNum, unsigned NumClauses)
3485
      : OMPLoopDirective(this, OMPTeamsDistributeDirectiveClass,
3486
                         OMPD_teams_distribute, StartLoc, EndLoc,
3487
409
                         CollapsedNum, NumClauses) {}
3488
3489
  /// Build an empty directive.
3490
  ///
3491
  /// \param CollapsedNum Number of collapsed nested loops.
3492
  /// \param NumClauses Number of clauses.
3493
  ///
3494
  explicit OMPTeamsDistributeDirective(unsigned CollapsedNum,
3495
                                       unsigned NumClauses)
3496
      : OMPLoopDirective(this, OMPTeamsDistributeDirectiveClass,
3497
                         OMPD_teams_distribute, SourceLocation(),
3498
13
                         SourceLocation(), CollapsedNum, NumClauses) {}
3499
3500
public:
3501
  /// Creates directive with a list of \a Clauses.
3502
  ///
3503
  /// \param C AST context.
3504
  /// \param StartLoc Starting location of the directive kind.
3505
  /// \param EndLoc Ending Location of the directive.
3506
  /// \param CollapsedNum Number of collapsed loops.
3507
  /// \param Clauses List of clauses.
3508
  /// \param AssociatedStmt Statement, associated with the directive.
3509
  /// \param Exprs Helper expressions for CodeGen.
3510
  ///
3511
  static OMPTeamsDistributeDirective *
3512
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3513
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3514
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3515
3516
  /// Creates an empty directive with the place for \a NumClauses clauses.
3517
  ///
3518
  /// \param C AST context.
3519
  /// \param CollapsedNum Number of collapsed nested loops.
3520
  /// \param NumClauses Number of clauses.
3521
  ///
3522
  static OMPTeamsDistributeDirective *CreateEmpty(const ASTContext &C,
3523
                                                  unsigned NumClauses,
3524
                                                  unsigned CollapsedNum,
3525
                                                  EmptyShell);
3526
3527
  static bool classof(const Stmt *T) {
3528
    return T->getStmtClass() == OMPTeamsDistributeDirectiveClass;
3529
  }
3530
};
3531
3532
/// This represents '#pragma omp teams distribute simd'
3533
/// combined directive.
3534
///
3535
/// \code
3536
/// #pragma omp teams distribute simd private(a,b)
3537
/// \endcode
3538
/// In this example directive '#pragma omp teams distribute simd'
3539
/// has clause 'private' with the variables 'a' and 'b'
3540
///
3541
class OMPTeamsDistributeSimdDirective final : public OMPLoopDirective {
3542
  friend class ASTStmtReader;
3543
3544
  /// Build directive with the given start and end location.
3545
  ///
3546
  /// \param StartLoc Starting location of the directive kind.
3547
  /// \param EndLoc Ending location of the directive.
3548
  /// \param CollapsedNum Number of collapsed nested loops.
3549
  /// \param NumClauses Number of clauses.
3550
  ///
3551
  OMPTeamsDistributeSimdDirective(SourceLocation StartLoc,
3552
                                  SourceLocation EndLoc, unsigned CollapsedNum,
3553
                                  unsigned NumClauses)
3554
      : OMPLoopDirective(this, OMPTeamsDistributeSimdDirectiveClass,
3555
                         OMPD_teams_distribute_simd, StartLoc, EndLoc,
3556
382
                         CollapsedNum, NumClauses) {}
3557
3558
  /// Build an empty directive.
3559
  ///
3560
  /// \param CollapsedNum Number of collapsed nested loops.
3561
  /// \param NumClauses Number of clauses.
3562
  ///
3563
  explicit OMPTeamsDistributeSimdDirective(unsigned CollapsedNum,
3564
                                           unsigned NumClauses)
3565
      : OMPLoopDirective(this, OMPTeamsDistributeSimdDirectiveClass,
3566
                         OMPD_teams_distribute_simd, SourceLocation(),
3567
35
                         SourceLocation(), CollapsedNum, NumClauses) {}
3568
3569
public:
3570
  /// Creates directive with a list of \a Clauses.
3571
  ///
3572
  /// \param C AST context.
3573
  /// \param StartLoc Starting location of the directive kind.
3574
  /// \param EndLoc Ending Location of the directive.
3575
  /// \param CollapsedNum Number of collapsed loops.
3576
  /// \param Clauses List of clauses.
3577
  /// \param AssociatedStmt Statement, associated with the directive.
3578
  /// \param Exprs Helper expressions for CodeGen.
3579
  ///
3580
  static OMPTeamsDistributeSimdDirective *
3581
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3582
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3583
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3584
3585
  /// Creates an empty directive with the place
3586
  /// for \a NumClauses clauses.
3587
  ///
3588
  /// \param C AST context.
3589
  /// \param CollapsedNum Number of collapsed nested loops.
3590
  /// \param NumClauses Number of clauses.
3591
  ///
3592
  static OMPTeamsDistributeSimdDirective *CreateEmpty(const ASTContext &C,
3593
                                                      unsigned NumClauses,
3594
                                                      unsigned CollapsedNum,
3595
                                                      EmptyShell);
3596
3597
  static bool classof(const Stmt *T) {
3598
    return T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass;
3599
  }
3600
};
3601
3602
/// This represents '#pragma omp teams distribute parallel for simd' composite
3603
/// directive.
3604
///
3605
/// \code
3606
/// #pragma omp teams distribute parallel for simd private(x)
3607
/// \endcode
3608
/// In this example directive '#pragma omp teams distribute parallel for simd'
3609
/// has clause 'private' with the variables 'x'
3610
///
3611
class OMPTeamsDistributeParallelForSimdDirective final
3612
    : public OMPLoopDirective {
3613
  friend class ASTStmtReader;
3614
3615
  /// Build directive with the given start and end location.
3616
  ///
3617
  /// \param StartLoc Starting location of the directive kind.
3618
  /// \param EndLoc Ending location of the directive.
3619
  /// \param CollapsedNum Number of collapsed nested loops.
3620
  /// \param NumClauses Number of clauses.
3621
  ///
3622
  OMPTeamsDistributeParallelForSimdDirective(SourceLocation StartLoc,
3623
                                             SourceLocation EndLoc,
3624
                                             unsigned CollapsedNum,
3625
                                             unsigned NumClauses)
3626
      : OMPLoopDirective(this, OMPTeamsDistributeParallelForSimdDirectiveClass,
3627
                         OMPD_teams_distribute_parallel_for_simd, StartLoc,
3628
218
                         EndLoc, CollapsedNum, NumClauses) {}
3629
3630
  /// Build an empty directive.
3631
  ///
3632
  /// \param CollapsedNum Number of collapsed nested loops.
3633
  /// \param NumClauses Number of clauses.
3634
  ///
3635
  explicit OMPTeamsDistributeParallelForSimdDirective(unsigned CollapsedNum,
3636
                                                      unsigned NumClauses)
3637
      : OMPLoopDirective(this, OMPTeamsDistributeParallelForSimdDirectiveClass,
3638
                         OMPD_teams_distribute_parallel_for_simd,
3639
                         SourceLocation(), SourceLocation(), CollapsedNum,
3640
72
                         NumClauses) {}
3641
3642
public:
3643
  /// Creates directive with a list of \a Clauses.
3644
  ///
3645
  /// \param C AST context.
3646
  /// \param StartLoc Starting location of the directive kind.
3647
  /// \param EndLoc Ending Location of the directive.
3648
  /// \param CollapsedNum Number of collapsed loops.
3649
  /// \param Clauses List of clauses.
3650
  /// \param AssociatedStmt Statement, associated with the directive.
3651
  /// \param Exprs Helper expressions for CodeGen.
3652
  ///
3653
  static OMPTeamsDistributeParallelForSimdDirective *
3654
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3655
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3656
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3657
3658
  /// Creates an empty directive with the place for \a NumClauses clauses.
3659
  ///
3660
  /// \param C AST context.
3661
  /// \param CollapsedNum Number of collapsed nested loops.
3662
  /// \param NumClauses Number of clauses.
3663
  ///
3664
  static OMPTeamsDistributeParallelForSimdDirective *
3665
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
3666
              EmptyShell);
3667
3668
  static bool classof(const Stmt *T) {
3669
    return T->getStmtClass() == OMPTeamsDistributeParallelForSimdDirectiveClass;
3670
  }
3671
};
3672
3673