Coverage Report

Created: 2023-11-11 10:31

/Users/buildslave/jenkins/workspace/coverage/llvm-project/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/ASTContext.h"
18
#include "clang/AST/Expr.h"
19
#include "clang/AST/OpenMPClause.h"
20
#include "clang/AST/Stmt.h"
21
#include "clang/AST/StmtCXX.h"
22
#include "clang/Basic/OpenMPKinds.h"
23
#include "clang/Basic/SourceLocation.h"
24
25
namespace clang {
26
27
//===----------------------------------------------------------------------===//
28
// AST classes for directives.
29
//===----------------------------------------------------------------------===//
30
31
/// Representation of an OpenMP canonical loop.
32
///
33
/// OpenMP 1.0 C/C++, section 2.4.1 for Construct; canonical-shape
34
/// OpenMP 2.0 C/C++, section 2.4.1 for Construct; canonical-shape
35
/// OpenMP 2.5, section 2.5.1 Loop Construct; canonical form
36
/// OpenMP 3.1, section 2.5.1 Loop Construct; canonical form
37
/// OpenMP 4.0, section 2.6 Canonical Loop Form
38
/// OpenMP 4.5, section 2.6 Canonical Loop Form
39
/// OpenMP 5.0, section 2.9.1 Canonical Loop Form
40
/// OpenMP 5.1, section 2.11.1 Canonical Loop Nest Form
41
///
42
/// An OpenMP canonical loop is a for-statement or range-based for-statement
43
/// with additional requirements that ensure that the number of iterations is
44
/// known before entering the loop and allow skipping to an arbitrary iteration.
45
/// The OMPCanonicalLoop AST node wraps a ForStmt or CXXForRangeStmt that is
46
/// known to fulfill OpenMP's canonical loop requirements because of being
47
/// associated to an OMPLoopBasedDirective. That is, the general structure is:
48
///
49
///  OMPLoopBasedDirective
50
/// [`- CapturedStmt   ]
51
/// [   `- CapturedDecl]
52
///        ` OMPCanonicalLoop
53
///          `- ForStmt/CXXForRangeStmt
54
///             `- Stmt
55
///
56
/// One or multiple CapturedStmt/CapturedDecl pairs may be inserted by some
57
/// directives such as OMPParallelForDirective, but others do not need them
58
/// (such as OMPTileDirective). In  The OMPCanonicalLoop and
59
/// ForStmt/CXXForRangeStmt pair is repeated for loop associated with the
60
/// directive. A OMPCanonicalLoop must not appear in the AST unless associated
61
/// with a OMPLoopBasedDirective. In an imperfectly nested loop nest, the
62
/// OMPCanonicalLoop may also be wrapped in a CompoundStmt:
63
///
64
/// [...]
65
///  ` OMPCanonicalLoop
66
///    `- ForStmt/CXXForRangeStmt
67
///       `- CompoundStmt
68
///          |- Leading in-between code (if any)
69
///          |- OMPCanonicalLoop
70
///          |  `- ForStmt/CXXForRangeStmt
71
///          |     `- ...
72
///          `- Trailing in-between code (if any)
73
///
74
/// The leading/trailing in-between code must not itself be a OMPCanonicalLoop
75
/// to avoid confusion which loop belongs to the nesting.
76
///
77
/// There are three different kinds of iteration variables for different
78
/// purposes:
79
/// * Loop user variable: The user-accessible variable with different value for
80
///   each iteration.
81
/// * Loop iteration variable: The variable used to identify a loop iteration;
82
///   for range-based for-statement, this is the hidden iterator '__begin'. For
83
///   other loops, it is identical to the loop user variable. Must be a
84
///   random-access iterator, pointer or integer type.
85
/// * Logical iteration counter: Normalized loop counter starting at 0 and
86
///   incrementing by one at each iteration. Allows abstracting over the type
87
///   of the loop iteration variable and is always an unsigned integer type
88
///   appropriate to represent the range of the loop iteration variable. Its
89
///   value corresponds to the logical iteration number in the OpenMP
90
///   specification.
91
///
92
/// This AST node provides two captured statements:
93
/// * The distance function which computes the number of iterations.
94
/// * The loop user variable function that computes the loop user variable when
95
///   given a logical iteration number.
96
///
97
/// These captured statements provide the link between C/C++ semantics and the
98
/// logical iteration counters used by the OpenMPIRBuilder which is
99
/// language-agnostic and therefore does not know e.g. how to advance a
100
/// random-access iterator. The OpenMPIRBuilder will use this information to
101
/// apply simd, workshare-loop, distribute, taskloop and loop directives to the
102
/// loop. For compatibility with the non-OpenMPIRBuilder codegen path, an
103
/// OMPCanonicalLoop can itself also be wrapped into the CapturedStmts of an
104
/// OMPLoopDirective and skipped when searching for the associated syntactical
105
/// loop.
106
///
107
/// Example:
108
/// <code>
109
///   std::vector<std::string> Container{1,2,3};
110
///   for (std::string Str : Container)
111
///      Body(Str);
112
/// </code>
113
/// which is syntactic sugar for approximately:
114
/// <code>
115
///   auto &&__range = Container;
116
///   auto __begin = std::begin(__range);
117
///   auto __end = std::end(__range);
118
///   for (; __begin != __end; ++__begin) {
119
///     std::String Str = *__begin;
120
///     Body(Str);
121
///   }
122
/// </code>
123
/// In this example, the loop user variable is `Str`, the loop iteration
124
/// variable is `__begin` of type `std::vector<std::string>::iterator` and the
125
/// logical iteration number type is `size_t` (unsigned version of
126
/// `std::vector<std::string>::iterator::difference_type` aka `ptrdiff_t`).
127
/// Therefore, the distance function will be
128
/// <code>
129
///   [&](size_t &Result) { Result = __end - __begin; }
130
/// </code>
131
/// and the loop variable function is
132
/// <code>
133
///   [&,__begin](std::vector<std::string>::iterator &Result, size_t Logical) {
134
///     Result = __begin + Logical;
135
///   }
136
/// </code>
137
/// The variable `__begin`, aka the loop iteration variable, is captured by
138
/// value because it is modified in the loop body, but both functions require
139
/// the initial value. The OpenMP specification explicitly leaves unspecified
140
/// when the loop expressions are evaluated such that a capture by reference is
141
/// sufficient.
142
class OMPCanonicalLoop : public Stmt {
143
  friend class ASTStmtReader;
144
  friend class ASTStmtWriter;
145
146
  /// Children of this AST node.
147
  enum {
148
    LOOP_STMT,
149
    DISTANCE_FUNC,
150
    LOOPVAR_FUNC,
151
    LOOPVAR_REF,
152
    LastSubStmt = LOOPVAR_REF
153
  };
154
155
private:
156
  /// This AST node's children.
157
  Stmt *SubStmts[LastSubStmt + 1] = {};
158
159
131
  OMPCanonicalLoop() : Stmt(StmtClass::OMPCanonicalLoopClass) {}
160
161
public:
162
  /// Create a new OMPCanonicalLoop.
163
  static OMPCanonicalLoop *create(const ASTContext &Ctx, Stmt *LoopStmt,
164
                                  CapturedStmt *DistanceFunc,
165
                                  CapturedStmt *LoopVarFunc,
166
106
                                  DeclRefExpr *LoopVarRef) {
167
106
    OMPCanonicalLoop *S = new (Ctx) OMPCanonicalLoop();
168
106
    S->setLoopStmt(LoopStmt);
169
106
    S->setDistanceFunc(DistanceFunc);
170
106
    S->setLoopVarFunc(LoopVarFunc);
171
106
    S->setLoopVarRef(LoopVarRef);
172
106
    return S;
173
106
  }
174
175
  /// Create an empty OMPCanonicalLoop for deserialization.
176
25
  static OMPCanonicalLoop *createEmpty(const ASTContext &Ctx) {
177
25
    return new (Ctx) OMPCanonicalLoop();
178
25
  }
179
180
533k
  static bool classof(const Stmt *S) {
181
533k
    return S->getStmtClass() == StmtClass::OMPCanonicalLoopClass;
182
533k
  }
183
184
351
  SourceLocation getBeginLoc() const { return getLoopStmt()->getBeginLoc(); }
185
60
  SourceLocation getEndLoc() const { return getLoopStmt()->getEndLoc(); }
186
187
  /// Return this AST node's children.
188
  /// @{
189
105
  child_range children() {
190
105
    return child_range(&SubStmts[0], &SubStmts[0] + LastSubStmt + 1);
191
105
  }
192
0
  const_child_range children() const {
193
0
    return const_child_range(&SubStmts[0], &SubStmts[0] + LastSubStmt + 1);
194
0
  }
195
  /// @}
196
197
  /// The wrapped syntactic loop statement (ForStmt or CXXForRangeStmt).
198
  /// @{
199
156
  Stmt *getLoopStmt() { return SubStmts[LOOP_STMT]; }
200
529
  const Stmt *getLoopStmt() const { return SubStmts[LOOP_STMT]; }
201
106
  void setLoopStmt(Stmt *S) {
202
106
    assert((isa<ForStmt>(S) || isa<CXXForRangeStmt>(S)) &&
203
106
           "Canonical loop must be a for loop (range-based or otherwise)");
204
106
    SubStmts[LOOP_STMT] = S;
205
106
  }
206
  /// @}
207
208
  /// The function that computes the number of loop iterations. Can be evaluated
209
  /// before entering the loop but after the syntactical loop's init
210
  /// statement(s).
211
  ///
212
  /// Function signature: void(LogicalTy &Result)
213
  /// Any values necessary to compute the distance are captures of the closure.
214
  /// @{
215
0
  CapturedStmt *getDistanceFunc() {
216
0
    return cast<CapturedStmt>(SubStmts[DISTANCE_FUNC]);
217
0
  }
218
54
  const CapturedStmt *getDistanceFunc() const {
219
54
    return cast<CapturedStmt>(SubStmts[DISTANCE_FUNC]);
220
54
  }
221
106
  void setDistanceFunc(CapturedStmt *S) {
222
106
    assert(S && "Expected non-null captured statement");
223
106
    SubStmts[DISTANCE_FUNC] = S;
224
106
  }
225
  /// @}
226
227
  /// The function that computes the loop user variable from a logical iteration
228
  /// counter. Can be evaluated as first statement in the loop.
229
  ///
230
  /// Function signature: void(LoopVarTy &Result, LogicalTy Number)
231
  /// Any other values required to compute the loop user variable (such as start
232
  /// value, step size) are captured by the closure. In particular, the initial
233
  /// value of loop iteration variable is captured by value to be unaffected by
234
  /// previous iterations.
235
  /// @{
236
0
  CapturedStmt *getLoopVarFunc() {
237
0
    return cast<CapturedStmt>(SubStmts[LOOPVAR_FUNC]);
238
0
  }
239
54
  const CapturedStmt *getLoopVarFunc() const {
240
54
    return cast<CapturedStmt>(SubStmts[LOOPVAR_FUNC]);
241
54
  }
242
106
  void setLoopVarFunc(CapturedStmt *S) {
243
106
    assert(S && "Expected non-null captured statement");
244
106
    SubStmts[LOOPVAR_FUNC] = S;
245
106
  }
246
  /// @}
247
248
  /// Reference to the loop user variable as accessed in the loop body.
249
  /// @{
250
0
  DeclRefExpr *getLoopVarRef() {
251
0
    return cast<DeclRefExpr>(SubStmts[LOOPVAR_REF]);
252
0
  }
253
54
  const DeclRefExpr *getLoopVarRef() const {
254
54
    return cast<DeclRefExpr>(SubStmts[LOOPVAR_REF]);
255
54
  }
256
106
  void setLoopVarRef(DeclRefExpr *E) {
257
106
    assert(E && "Expected non-null loop variable");
258
106
    SubStmts[LOOPVAR_REF] = E;
259
106
  }
260
  /// @}
261
};
262
263
/// This is a basic class for representing single OpenMP executable
264
/// directive.
265
///
266
class OMPExecutableDirective : public Stmt {
267
  friend class ASTStmtReader;
268
  friend class ASTStmtWriter;
269
270
  /// Kind of the directive.
271
  OpenMPDirectiveKind Kind = llvm::omp::OMPD_unknown;
272
  /// Starting location of the directive (directive keyword).
273
  SourceLocation StartLoc;
274
  /// Ending location of the directive.
275
  SourceLocation EndLoc;
276
277
  /// Get the clauses storage.
278
0
  MutableArrayRef<OMPClause *> getClauses() {
279
0
    if (!Data)
280
0
      return std::nullopt;
281
0
    return Data->getClauses();
282
0
  }
283
284
  /// Was this directive mapped from an another directive?
285
  /// e.g. 1) omp loop bind(parallel) is mapped to OMPD_for
286
  ///      2) omp loop bind(teams) is mapped to OMPD_distribute
287
  ///      3) omp loop bind(thread) is mapped to OMPD_simd
288
  /// It was necessary to note it down in the Directive because of
289
  /// clang::TreeTransform::TransformOMPExecutableDirective() pass in
290
  /// the frontend.
291
  OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown;
292
293
protected:
294
  /// Data, associated with the directive.
295
  OMPChildren *Data = nullptr;
296
297
  /// Build instance of directive of class \a K.
298
  ///
299
  /// \param SC Statement class.
300
  /// \param K Kind of OpenMP directive.
301
  /// \param StartLoc Starting location of the directive (directive keyword).
302
  /// \param EndLoc Ending location of the directive.
303
  ///
304
  OMPExecutableDirective(StmtClass SC, OpenMPDirectiveKind K,
305
                         SourceLocation StartLoc, SourceLocation EndLoc)
306
489k
      : Stmt(SC), Kind(K), StartLoc(std::move(StartLoc)),
307
489k
        EndLoc(std::move(EndLoc)) {}
308
309
  template <typename T, typename... Params>
310
  static T *createDirective(const ASTContext &C, ArrayRef<OMPClause *> Clauses,
311
                            Stmt *AssociatedStmt, unsigned NumChildren,
312
462k
                            Params &&... P) {
313
462k
    void *Mem =
314
462k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
462k
                                                 NumChildren),
316
462k
                   alignof(T));
317
318
462k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
462k
                                     AssociatedStmt, NumChildren);
320
462k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
462k
    Inst->Data = Data;
322
462k
    return Inst;
323
462k
  }
Unexecuted instantiation: clang::OMPMetaDirective* clang::OMPExecutableDirective::createDirective<clang::OMPMetaDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
clang::OMPParallelDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
40.9k
                            Params &&... P) {
313
40.9k
    void *Mem =
314
40.9k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
40.9k
                                                 NumChildren),
316
40.9k
                   alignof(T));
317
318
40.9k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
40.9k
                                     AssociatedStmt, NumChildren);
320
40.9k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
40.9k
    Inst->Data = Data;
322
40.9k
    return Inst;
323
40.9k
  }
clang::OMPSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
8.53k
                            Params &&... P) {
313
8.53k
    void *Mem =
314
8.53k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
8.53k
                                                 NumChildren),
316
8.53k
                   alignof(T));
317
318
8.53k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
8.53k
                                     AssociatedStmt, NumChildren);
320
8.53k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
8.53k
    Inst->Data = Data;
322
8.53k
    return Inst;
323
8.53k
  }
clang::OMPForDirective* clang::OMPExecutableDirective::createDirective<clang::OMPForDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
10.0k
                            Params &&... P) {
313
10.0k
    void *Mem =
314
10.0k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
10.0k
                                                 NumChildren),
316
10.0k
                   alignof(T));
317
318
10.0k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
10.0k
                                     AssociatedStmt, NumChildren);
320
10.0k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
10.0k
    Inst->Data = Data;
322
10.0k
    return Inst;
323
10.0k
  }
clang::OMPTileDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTileDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
72
                            Params &&... P) {
313
72
    void *Mem =
314
72
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
72
                                                 NumChildren),
316
72
                   alignof(T));
317
318
72
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
72
                                     AssociatedStmt, NumChildren);
320
72
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
72
    Inst->Data = Data;
322
72
    return Inst;
323
72
  }
clang::OMPUnrollDirective* clang::OMPExecutableDirective::createDirective<clang::OMPUnrollDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
97
                            Params &&... P) {
313
97
    void *Mem =
314
97
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
97
                                                 NumChildren),
316
97
                   alignof(T));
317
318
97
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
97
                                     AssociatedStmt, NumChildren);
320
97
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
97
    Inst->Data = Data;
322
97
    return Inst;
323
97
  }
clang::OMPForSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPForSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
7.67k
                            Params &&... P) {
313
7.67k
    void *Mem =
314
7.67k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
7.67k
                                                 NumChildren),
316
7.67k
                   alignof(T));
317
318
7.67k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
7.67k
                                     AssociatedStmt, NumChildren);
320
7.67k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
7.67k
    Inst->Data = Data;
322
7.67k
    return Inst;
323
7.67k
  }
clang::OMPSectionsDirective* clang::OMPExecutableDirective::createDirective<clang::OMPSectionsDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
5.60k
                            Params &&... P) {
313
5.60k
    void *Mem =
314
5.60k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
5.60k
                                                 NumChildren),
316
5.60k
                   alignof(T));
317
318
5.60k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
5.60k
                                     AssociatedStmt, NumChildren);
320
5.60k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
5.60k
    Inst->Data = Data;
322
5.60k
    return Inst;
323
5.60k
  }
clang::OMPSectionDirective* clang::OMPExecutableDirective::createDirective<clang::OMPSectionDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
1.23k
                            Params &&... P) {
313
1.23k
    void *Mem =
314
1.23k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
1.23k
                                                 NumChildren),
316
1.23k
                   alignof(T));
317
318
1.23k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
1.23k
                                     AssociatedStmt, NumChildren);
320
1.23k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
1.23k
    Inst->Data = Data;
322
1.23k
    return Inst;
323
1.23k
  }
clang::OMPScopeDirective* clang::OMPExecutableDirective::createDirective<clang::OMPScopeDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
1.14k
                            Params &&... P) {
313
1.14k
    void *Mem =
314
1.14k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
1.14k
                                                 NumChildren),
316
1.14k
                   alignof(T));
317
318
1.14k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
1.14k
                                     AssociatedStmt, NumChildren);
320
1.14k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
1.14k
    Inst->Data = Data;
322
1.14k
    return Inst;
323
1.14k
  }
clang::OMPSingleDirective* clang::OMPExecutableDirective::createDirective<clang::OMPSingleDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
2.49k
                            Params &&... P) {
313
2.49k
    void *Mem =
314
2.49k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
2.49k
                                                 NumChildren),
316
2.49k
                   alignof(T));
317
318
2.49k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
2.49k
                                     AssociatedStmt, NumChildren);
320
2.49k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
2.49k
    Inst->Data = Data;
322
2.49k
    return Inst;
323
2.49k
  }
clang::OMPMasterDirective* clang::OMPExecutableDirective::createDirective<clang::OMPMasterDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
1.67k
                            Params &&... P) {
313
1.67k
    void *Mem =
314
1.67k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
1.67k
                                                 NumChildren),
316
1.67k
                   alignof(T));
317
318
1.67k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
1.67k
                                     AssociatedStmt, NumChildren);
320
1.67k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
1.67k
    Inst->Data = Data;
322
1.67k
    return Inst;
323
1.67k
  }
clang::OMPCriticalDirective* clang::OMPExecutableDirective::createDirective<clang::OMPCriticalDirective, clang::DeclarationNameInfo const&, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::DeclarationNameInfo const&, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
2.38k
                            Params &&... P) {
313
2.38k
    void *Mem =
314
2.38k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
2.38k
                                                 NumChildren),
316
2.38k
                   alignof(T));
317
318
2.38k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
2.38k
                                     AssociatedStmt, NumChildren);
320
2.38k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
2.38k
    Inst->Data = Data;
322
2.38k
    return Inst;
323
2.38k
  }
clang::OMPParallelForDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelForDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
7.40k
                            Params &&... P) {
313
7.40k
    void *Mem =
314
7.40k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
7.40k
                                                 NumChildren),
316
7.40k
                   alignof(T));
317
318
7.40k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
7.40k
                                     AssociatedStmt, NumChildren);
320
7.40k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
7.40k
    Inst->Data = Data;
322
7.40k
    return Inst;
323
7.40k
  }
clang::OMPParallelForSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelForSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
8.19k
                            Params &&... P) {
313
8.19k
    void *Mem =
314
8.19k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
8.19k
                                                 NumChildren),
316
8.19k
                   alignof(T));
317
318
8.19k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
8.19k
                                     AssociatedStmt, NumChildren);
320
8.19k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
8.19k
    Inst->Data = Data;
322
8.19k
    return Inst;
323
8.19k
  }
clang::OMPParallelMasterDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelMasterDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
5.18k
                            Params &&... P) {
313
5.18k
    void *Mem =
314
5.18k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
5.18k
                                                 NumChildren),
316
5.18k
                   alignof(T));
317
318
5.18k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
5.18k
                                     AssociatedStmt, NumChildren);
320
5.18k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
5.18k
    Inst->Data = Data;
322
5.18k
    return Inst;
323
5.18k
  }
clang::OMPParallelMaskedDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelMaskedDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
3.74k
                            Params &&... P) {
313
3.74k
    void *Mem =
314
3.74k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
3.74k
                                                 NumChildren),
316
3.74k
                   alignof(T));
317
318
3.74k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
3.74k
                                     AssociatedStmt, NumChildren);
320
3.74k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
3.74k
    Inst->Data = Data;
322
3.74k
    return Inst;
323
3.74k
  }
clang::OMPParallelSectionsDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelSectionsDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
5.14k
                            Params &&... P) {
313
5.14k
    void *Mem =
314
5.14k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
5.14k
                                                 NumChildren),
316
5.14k
                   alignof(T));
317
318
5.14k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
5.14k
                                     AssociatedStmt, NumChildren);
320
5.14k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
5.14k
    Inst->Data = Data;
322
5.14k
    return Inst;
323
5.14k
  }
clang::OMPTaskDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTaskDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
5.13k
                            Params &&... P) {
313
5.13k
    void *Mem =
314
5.13k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
5.13k
                                                 NumChildren),
316
5.13k
                   alignof(T));
317
318
5.13k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
5.13k
                                     AssociatedStmt, NumChildren);
320
5.13k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
5.13k
    Inst->Data = Data;
322
5.13k
    return Inst;
323
5.13k
  }
clang::OMPErrorDirective* clang::OMPExecutableDirective::createDirective<clang::OMPErrorDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
80
                            Params &&... P) {
313
80
    void *Mem =
314
80
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
80
                                                 NumChildren),
316
80
                   alignof(T));
317
318
80
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
80
                                     AssociatedStmt, NumChildren);
320
80
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
80
    Inst->Data = Data;
322
80
    return Inst;
323
80
  }
clang::OMPTaskwaitDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTaskwaitDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
1.03k
                            Params &&... P) {
313
1.03k
    void *Mem =
314
1.03k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
1.03k
                                                 NumChildren),
316
1.03k
                   alignof(T));
317
318
1.03k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
1.03k
                                     AssociatedStmt, NumChildren);
320
1.03k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
1.03k
    Inst->Data = Data;
322
1.03k
    return Inst;
323
1.03k
  }
clang::OMPTaskgroupDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTaskgroupDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
8.60k
                            Params &&... P) {
313
8.60k
    void *Mem =
314
8.60k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
8.60k
                                                 NumChildren),
316
8.60k
                   alignof(T));
317
318
8.60k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
8.60k
                                     AssociatedStmt, NumChildren);
320
8.60k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
8.60k
    Inst->Data = Data;
322
8.60k
    return Inst;
323
8.60k
  }
clang::OMPCancelDirective* clang::OMPExecutableDirective::createDirective<clang::OMPCancelDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
712
                            Params &&... P) {
313
712
    void *Mem =
314
712
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
712
                                                 NumChildren),
316
712
                   alignof(T));
317
318
712
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
712
                                     AssociatedStmt, NumChildren);
320
712
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
712
    Inst->Data = Data;
322
712
    return Inst;
323
712
  }
clang::OMPFlushDirective* clang::OMPExecutableDirective::createDirective<clang::OMPFlushDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
1.15k
                            Params &&... P) {
313
1.15k
    void *Mem =
314
1.15k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
1.15k
                                                 NumChildren),
316
1.15k
                   alignof(T));
317
318
1.15k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
1.15k
                                     AssociatedStmt, NumChildren);
320
1.15k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
1.15k
    Inst->Data = Data;
322
1.15k
    return Inst;
323
1.15k
  }
clang::OMPDepobjDirective* clang::OMPExecutableDirective::createDirective<clang::OMPDepobjDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
552
                            Params &&... P) {
313
552
    void *Mem =
314
552
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
552
                                                 NumChildren),
316
552
                   alignof(T));
317
318
552
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
552
                                     AssociatedStmt, NumChildren);
320
552
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
552
    Inst->Data = Data;
322
552
    return Inst;
323
552
  }
clang::OMPScanDirective* clang::OMPExecutableDirective::createDirective<clang::OMPScanDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
173
                            Params &&... P) {
313
173
    void *Mem =
314
173
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
173
                                                 NumChildren),
316
173
                   alignof(T));
317
318
173
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
173
                                     AssociatedStmt, NumChildren);
320
173
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
173
    Inst->Data = Data;
322
173
    return Inst;
323
173
  }
clang::OMPOrderedDirective* clang::OMPExecutableDirective::createDirective<clang::OMPOrderedDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
1.74k
                            Params &&... P) {
313
1.74k
    void *Mem =
314
1.74k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
1.74k
                                                 NumChildren),
316
1.74k
                   alignof(T));
317
318
1.74k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
1.74k
                                     AssociatedStmt, NumChildren);
320
1.74k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
1.74k
    Inst->Data = Data;
322
1.74k
    return Inst;
323
1.74k
  }
clang::OMPAtomicDirective* clang::OMPExecutableDirective::createDirective<clang::OMPAtomicDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
18.8k
                            Params &&... P) {
313
18.8k
    void *Mem =
314
18.8k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
18.8k
                                                 NumChildren),
316
18.8k
                   alignof(T));
317
318
18.8k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
18.8k
                                     AssociatedStmt, NumChildren);
320
18.8k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
18.8k
    Inst->Data = Data;
322
18.8k
    return Inst;
323
18.8k
  }
clang::OMPTargetDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
73.1k
                            Params &&... P) {
313
73.1k
    void *Mem =
314
73.1k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
73.1k
                                                 NumChildren),
316
73.1k
                   alignof(T));
317
318
73.1k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
73.1k
                                     AssociatedStmt, NumChildren);
320
73.1k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
73.1k
    Inst->Data = Data;
322
73.1k
    return Inst;
323
73.1k
  }
clang::OMPTargetParallelDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetParallelDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
9.84k
                            Params &&... P) {
313
9.84k
    void *Mem =
314
9.84k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
9.84k
                                                 NumChildren),
316
9.84k
                   alignof(T));
317
318
9.84k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
9.84k
                                     AssociatedStmt, NumChildren);
320
9.84k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
9.84k
    Inst->Data = Data;
322
9.84k
    return Inst;
323
9.84k
  }
clang::OMPTargetParallelForDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetParallelForDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
10.2k
                            Params &&... P) {
313
10.2k
    void *Mem =
314
10.2k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
10.2k
                                                 NumChildren),
316
10.2k
                   alignof(T));
317
318
10.2k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
10.2k
                                     AssociatedStmt, NumChildren);
320
10.2k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
10.2k
    Inst->Data = Data;
322
10.2k
    return Inst;
323
10.2k
  }
clang::OMPTargetDataDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetDataDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
5.86k
                            Params &&... P) {
313
5.86k
    void *Mem =
314
5.86k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
5.86k
                                                 NumChildren),
316
5.86k
                   alignof(T));
317
318
5.86k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
5.86k
                                     AssociatedStmt, NumChildren);
320
5.86k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
5.86k
    Inst->Data = Data;
322
5.86k
    return Inst;
323
5.86k
  }
clang::OMPTargetEnterDataDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetEnterDataDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
2.35k
                            Params &&... P) {
313
2.35k
    void *Mem =
314
2.35k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
2.35k
                                                 NumChildren),
316
2.35k
                   alignof(T));
317
318
2.35k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
2.35k
                                     AssociatedStmt, NumChildren);
320
2.35k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
2.35k
    Inst->Data = Data;
322
2.35k
    return Inst;
323
2.35k
  }
clang::OMPTargetExitDataDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetExitDataDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
2.33k
                            Params &&... P) {
313
2.33k
    void *Mem =
314
2.33k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
2.33k
                                                 NumChildren),
316
2.33k
                   alignof(T));
317
318
2.33k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
2.33k
                                     AssociatedStmt, NumChildren);
320
2.33k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
2.33k
    Inst->Data = Data;
322
2.33k
    return Inst;
323
2.33k
  }
clang::OMPTeamsDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTeamsDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
26.2k
                            Params &&... P) {
313
26.2k
    void *Mem =
314
26.2k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
26.2k
                                                 NumChildren),
316
26.2k
                   alignof(T));
317
318
26.2k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
26.2k
                                     AssociatedStmt, NumChildren);
320
26.2k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
26.2k
    Inst->Data = Data;
322
26.2k
    return Inst;
323
26.2k
  }
clang::OMPTaskLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTaskLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
8.64k
                            Params &&... P) {
313
8.64k
    void *Mem =
314
8.64k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
8.64k
                                                 NumChildren),
316
8.64k
                   alignof(T));
317
318
8.64k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
8.64k
                                     AssociatedStmt, NumChildren);
320
8.64k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
8.64k
    Inst->Data = Data;
322
8.64k
    return Inst;
323
8.64k
  }
clang::OMPTaskLoopSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTaskLoopSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
7.32k
                            Params &&... P) {
313
7.32k
    void *Mem =
314
7.32k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
7.32k
                                                 NumChildren),
316
7.32k
                   alignof(T));
317
318
7.32k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
7.32k
                                     AssociatedStmt, NumChildren);
320
7.32k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
7.32k
    Inst->Data = Data;
322
7.32k
    return Inst;
323
7.32k
  }
clang::OMPMasterTaskLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPMasterTaskLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
6.12k
                            Params &&... P) {
313
6.12k
    void *Mem =
314
6.12k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
6.12k
                                                 NumChildren),
316
6.12k
                   alignof(T));
317
318
6.12k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
6.12k
                                     AssociatedStmt, NumChildren);
320
6.12k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
6.12k
    Inst->Data = Data;
322
6.12k
    return Inst;
323
6.12k
  }
clang::OMPMaskedTaskLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPMaskedTaskLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
3.27k
                            Params &&... P) {
313
3.27k
    void *Mem =
314
3.27k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
3.27k
                                                 NumChildren),
316
3.27k
                   alignof(T));
317
318
3.27k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
3.27k
                                     AssociatedStmt, NumChildren);
320
3.27k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
3.27k
    Inst->Data = Data;
322
3.27k
    return Inst;
323
3.27k
  }
clang::OMPMasterTaskLoopSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPMasterTaskLoopSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
7.15k
                            Params &&... P) {
313
7.15k
    void *Mem =
314
7.15k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
7.15k
                                                 NumChildren),
316
7.15k
                   alignof(T));
317
318
7.15k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
7.15k
                                     AssociatedStmt, NumChildren);
320
7.15k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
7.15k
    Inst->Data = Data;
322
7.15k
    return Inst;
323
7.15k
  }
clang::OMPMaskedTaskLoopSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPMaskedTaskLoopSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
6.35k
                            Params &&... P) {
313
6.35k
    void *Mem =
314
6.35k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
6.35k
                                                 NumChildren),
316
6.35k
                   alignof(T));
317
318
6.35k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
6.35k
                                     AssociatedStmt, NumChildren);
320
6.35k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
6.35k
    Inst->Data = Data;
322
6.35k
    return Inst;
323
6.35k
  }
clang::OMPParallelMasterTaskLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelMasterTaskLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
4.16k
                            Params &&... P) {
313
4.16k
    void *Mem =
314
4.16k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
4.16k
                                                 NumChildren),
316
4.16k
                   alignof(T));
317
318
4.16k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
4.16k
                                     AssociatedStmt, NumChildren);
320
4.16k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
4.16k
    Inst->Data = Data;
322
4.16k
    return Inst;
323
4.16k
  }
clang::OMPParallelMaskedTaskLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelMaskedTaskLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
3.87k
                            Params &&... P) {
313
3.87k
    void *Mem =
314
3.87k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
3.87k
                                                 NumChildren),
316
3.87k
                   alignof(T));
317
318
3.87k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
3.87k
                                     AssociatedStmt, NumChildren);
320
3.87k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
3.87k
    Inst->Data = Data;
322
3.87k
    return Inst;
323
3.87k
  }
clang::OMPParallelMasterTaskLoopSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelMasterTaskLoopSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
5.22k
                            Params &&... P) {
313
5.22k
    void *Mem =
314
5.22k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
5.22k
                                                 NumChildren),
316
5.22k
                   alignof(T));
317
318
5.22k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
5.22k
                                     AssociatedStmt, NumChildren);
320
5.22k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
5.22k
    Inst->Data = Data;
322
5.22k
    return Inst;
323
5.22k
  }
clang::OMPParallelMaskedTaskLoopSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelMaskedTaskLoopSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
4.82k
                            Params &&... P) {
313
4.82k
    void *Mem =
314
4.82k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
4.82k
                                                 NumChildren),
316
4.82k
                   alignof(T));
317
318
4.82k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
4.82k
                                     AssociatedStmt, NumChildren);
320
4.82k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
4.82k
    Inst->Data = Data;
322
4.82k
    return Inst;
323
4.82k
  }
clang::OMPDistributeDirective* clang::OMPExecutableDirective::createDirective<clang::OMPDistributeDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
2.09k
                            Params &&... P) {
313
2.09k
    void *Mem =
314
2.09k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
2.09k
                                                 NumChildren),
316
2.09k
                   alignof(T));
317
318
2.09k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
2.09k
                                     AssociatedStmt, NumChildren);
320
2.09k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
2.09k
    Inst->Data = Data;
322
2.09k
    return Inst;
323
2.09k
  }
clang::OMPTargetUpdateDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetUpdateDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
3.66k
                            Params &&... P) {
313
3.66k
    void *Mem =
314
3.66k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
3.66k
                                                 NumChildren),
316
3.66k
                   alignof(T));
317
318
3.66k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
3.66k
                                     AssociatedStmt, NumChildren);
320
3.66k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
3.66k
    Inst->Data = Data;
322
3.66k
    return Inst;
323
3.66k
  }
clang::OMPDistributeParallelForDirective* clang::OMPExecutableDirective::createDirective<clang::OMPDistributeParallelForDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
6.66k
                            Params &&... P) {
313
6.66k
    void *Mem =
314
6.66k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
6.66k
                                                 NumChildren),
316
6.66k
                   alignof(T));
317
318
6.66k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
6.66k
                                     AssociatedStmt, NumChildren);
320
6.66k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
6.66k
    Inst->Data = Data;
322
6.66k
    return Inst;
323
6.66k
  }
clang::OMPDistributeParallelForSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPDistributeParallelForSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
7.94k
                            Params &&... P) {
313
7.94k
    void *Mem =
314
7.94k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
7.94k
                                                 NumChildren),
316
7.94k
                   alignof(T));
317
318
7.94k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
7.94k
                                     AssociatedStmt, NumChildren);
320
7.94k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
7.94k
    Inst->Data = Data;
322
7.94k
    return Inst;
323
7.94k
  }
clang::OMPDistributeSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPDistributeSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
6.39k
                            Params &&... P) {
313
6.39k
    void *Mem =
314
6.39k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
6.39k
                                                 NumChildren),
316
6.39k
                   alignof(T));
317
318
6.39k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
6.39k
                                     AssociatedStmt, NumChildren);
320
6.39k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
6.39k
    Inst->Data = Data;
322
6.39k
    return Inst;
323
6.39k
  }
clang::OMPTargetParallelForSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetParallelForSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
10.0k
                            Params &&... P) {
313
10.0k
    void *Mem =
314
10.0k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
10.0k
                                                 NumChildren),
316
10.0k
                   alignof(T));
317
318
10.0k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
10.0k
                                     AssociatedStmt, NumChildren);
320
10.0k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
10.0k
    Inst->Data = Data;
322
10.0k
    return Inst;
323
10.0k
  }
clang::OMPTargetSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
10.6k
                            Params &&... P) {
313
10.6k
    void *Mem =
314
10.6k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
10.6k
                                                 NumChildren),
316
10.6k
                   alignof(T));
317
318
10.6k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
10.6k
                                     AssociatedStmt, NumChildren);
320
10.6k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
10.6k
    Inst->Data = Data;
322
10.6k
    return Inst;
323
10.6k
  }
clang::OMPTeamsDistributeDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTeamsDistributeDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
5.84k
                            Params &&... P) {
313
5.84k
    void *Mem =
314
5.84k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
5.84k
                                                 NumChildren),
316
5.84k
                   alignof(T));
317
318
5.84k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
5.84k
                                     AssociatedStmt, NumChildren);
320
5.84k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
5.84k
    Inst->Data = Data;
322
5.84k
    return Inst;
323
5.84k
  }
clang::OMPTeamsDistributeSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTeamsDistributeSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
6.44k
                            Params &&... P) {
313
6.44k
    void *Mem =
314
6.44k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
6.44k
                                                 NumChildren),
316
6.44k
                   alignof(T));
317
318
6.44k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
6.44k
                                     AssociatedStmt, NumChildren);
320
6.44k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
6.44k
    Inst->Data = Data;
322
6.44k
    return Inst;
323
6.44k
  }
clang::OMPTeamsDistributeParallelForSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTeamsDistributeParallelForSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
7.31k
                            Params &&... P) {
313
7.31k
    void *Mem =
314
7.31k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
7.31k
                                                 NumChildren),
316
7.31k
                   alignof(T));
317
318
7.31k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
7.31k
                                     AssociatedStmt, NumChildren);
320
7.31k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
7.31k
    Inst->Data = Data;
322
7.31k
    return Inst;
323
7.31k
  }
clang::OMPTeamsDistributeParallelForDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTeamsDistributeParallelForDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
6.35k
                            Params &&... P) {
313
6.35k
    void *Mem =
314
6.35k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
6.35k
                                                 NumChildren),
316
6.35k
                   alignof(T));
317
318
6.35k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
6.35k
                                     AssociatedStmt, NumChildren);
320
6.35k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
6.35k
    Inst->Data = Data;
322
6.35k
    return Inst;
323
6.35k
  }
clang::OMPTargetTeamsDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetTeamsDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
9.71k
                            Params &&... P) {
313
9.71k
    void *Mem =
314
9.71k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
9.71k
                                                 NumChildren),
316
9.71k
                   alignof(T));
317
318
9.71k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
9.71k
                                     AssociatedStmt, NumChildren);
320
9.71k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
9.71k
    Inst->Data = Data;
322
9.71k
    return Inst;
323
9.71k
  }
clang::OMPTargetTeamsDistributeDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetTeamsDistributeDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
9.12k
                            Params &&... P) {
313
9.12k
    void *Mem =
314
9.12k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
9.12k
                                                 NumChildren),
316
9.12k
                   alignof(T));
317
318
9.12k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
9.12k
                                     AssociatedStmt, NumChildren);
320
9.12k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
9.12k
    Inst->Data = Data;
322
9.12k
    return Inst;
323
9.12k
  }
clang::OMPTargetTeamsDistributeParallelForDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetTeamsDistributeParallelForDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
9.19k
                            Params &&... P) {
313
9.19k
    void *Mem =
314
9.19k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
9.19k
                                                 NumChildren),
316
9.19k
                   alignof(T));
317
318
9.19k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
9.19k
                                     AssociatedStmt, NumChildren);
320
9.19k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
9.19k
    Inst->Data = Data;
322
9.19k
    return Inst;
323
9.19k
  }
clang::OMPTargetTeamsDistributeParallelForSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetTeamsDistributeParallelForSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
11.3k
                            Params &&... P) {
313
11.3k
    void *Mem =
314
11.3k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
11.3k
                                                 NumChildren),
316
11.3k
                   alignof(T));
317
318
11.3k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
11.3k
                                     AssociatedStmt, NumChildren);
320
11.3k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
11.3k
    Inst->Data = Data;
322
11.3k
    return Inst;
323
11.3k
  }
clang::OMPTargetTeamsDistributeSimdDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetTeamsDistributeSimdDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
10.7k
                            Params &&... P) {
313
10.7k
    void *Mem =
314
10.7k
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
10.7k
                                                 NumChildren),
316
10.7k
                   alignof(T));
317
318
10.7k
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
10.7k
                                     AssociatedStmt, NumChildren);
320
10.7k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
10.7k
    Inst->Data = Data;
322
10.7k
    return Inst;
323
10.7k
  }
clang::OMPInteropDirective* clang::OMPExecutableDirective::createDirective<clang::OMPInteropDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
204
                            Params &&... P) {
313
204
    void *Mem =
314
204
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
204
                                                 NumChildren),
316
204
                   alignof(T));
317
318
204
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
204
                                     AssociatedStmt, NumChildren);
320
204
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
204
    Inst->Data = Data;
322
204
    return Inst;
323
204
  }
clang::OMPDispatchDirective* clang::OMPExecutableDirective::createDirective<clang::OMPDispatchDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
130
                            Params &&... P) {
313
130
    void *Mem =
314
130
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
130
                                                 NumChildren),
316
130
                   alignof(T));
317
318
130
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
130
                                     AssociatedStmt, NumChildren);
320
130
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
130
    Inst->Data = Data;
322
130
    return Inst;
323
130
  }
clang::OMPMaskedDirective* clang::OMPExecutableDirective::createDirective<clang::OMPMaskedDirective, clang::SourceLocation&, clang::SourceLocation&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&)
Line
Count
Source
312
120
                            Params &&... P) {
313
120
    void *Mem =
314
120
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
120
                                                 NumChildren),
316
120
                   alignof(T));
317
318
120
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
120
                                     AssociatedStmt, NumChildren);
320
120
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
120
    Inst->Data = Data;
322
120
    return Inst;
323
120
  }
Unexecuted instantiation: clang::OMPGenericLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPGenericLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
clang::OMPTeamsGenericLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTeamsGenericLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
205
                            Params &&... P) {
313
205
    void *Mem =
314
205
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
205
                                                 NumChildren),
316
205
                   alignof(T));
317
318
205
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
205
                                     AssociatedStmt, NumChildren);
320
205
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
205
    Inst->Data = Data;
322
205
    return Inst;
323
205
  }
clang::OMPTargetTeamsGenericLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetTeamsGenericLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
517
                            Params &&... P) {
313
517
    void *Mem =
314
517
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
517
                                                 NumChildren),
316
517
                   alignof(T));
317
318
517
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
517
                                     AssociatedStmt, NumChildren);
320
517
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
517
    Inst->Data = Data;
322
517
    return Inst;
323
517
  }
clang::OMPParallelGenericLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPParallelGenericLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
43
                            Params &&... P) {
313
43
    void *Mem =
314
43
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
43
                                                 NumChildren),
316
43
                   alignof(T));
317
318
43
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
43
                                     AssociatedStmt, NumChildren);
320
43
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
43
    Inst->Data = Data;
322
43
    return Inst;
323
43
  }
clang::OMPTargetParallelGenericLoopDirective* clang::OMPExecutableDirective::createDirective<clang::OMPTargetParallelGenericLoopDirective, clang::SourceLocation&, clang::SourceLocation&, unsigned int&>(clang::ASTContext const&, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, unsigned int, clang::SourceLocation&, clang::SourceLocation&, unsigned int&)
Line
Count
Source
312
865
                            Params &&... P) {
313
865
    void *Mem =
314
865
        C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
315
865
                                                 NumChildren),
316
865
                   alignof(T));
317
318
865
    auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
319
865
                                     AssociatedStmt, NumChildren);
320
865
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
321
865
    Inst->Data = Data;
322
865
    return Inst;
323
865
  }
324
325
  template <typename T, typename... Params>
326
  static T *createEmptyDirective(const ASTContext &C, unsigned NumClauses,
327
                                 bool HasAssociatedStmt, unsigned NumChildren,
328
8.06k
                                 Params &&... P) {
329
8.06k
    void *Mem =
330
8.06k
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
8.06k
                                                 NumChildren),
332
8.06k
                   alignof(T));
333
8.06k
    auto *Data =
334
8.06k
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
8.06k
                                 HasAssociatedStmt, NumChildren);
336
8.06k
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
8.06k
    Inst->Data = Data;
338
8.06k
    return Inst;
339
8.06k
  }
clang::OMPSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
222
                                 Params &&... P) {
329
222
    void *Mem =
330
222
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
222
                                                 NumChildren),
332
222
                   alignof(T));
333
222
    auto *Data =
334
222
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
222
                                 HasAssociatedStmt, NumChildren);
336
222
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
222
    Inst->Data = Data;
338
222
    return Inst;
339
222
  }
clang::OMPForDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPForDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
509
                                 Params &&... P) {
329
509
    void *Mem =
330
509
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
509
                                                 NumChildren),
332
509
                   alignof(T));
333
509
    auto *Data =
334
509
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
509
                                 HasAssociatedStmt, NumChildren);
336
509
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
509
    Inst->Data = Data;
338
509
    return Inst;
339
509
  }
clang::OMPTileDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTileDirective, clang::SourceLocation, clang::SourceLocation, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, clang::SourceLocation&&, clang::SourceLocation&&, unsigned int&)
Line
Count
Source
328
26
                                 Params &&... P) {
329
26
    void *Mem =
330
26
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
26
                                                 NumChildren),
332
26
                   alignof(T));
333
26
    auto *Data =
334
26
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
26
                                 HasAssociatedStmt, NumChildren);
336
26
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
26
    Inst->Data = Data;
338
26
    return Inst;
339
26
  }
clang::OMPUnrollDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPUnrollDirective, clang::SourceLocation, clang::SourceLocation>(clang::ASTContext const&, unsigned int, bool, unsigned int, clang::SourceLocation&&, clang::SourceLocation&&)
Line
Count
Source
328
26
                                 Params &&... P) {
329
26
    void *Mem =
330
26
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
26
                                                 NumChildren),
332
26
                   alignof(T));
333
26
    auto *Data =
334
26
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
26
                                 HasAssociatedStmt, NumChildren);
336
26
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
26
    Inst->Data = Data;
338
26
    return Inst;
339
26
  }
clang::OMPForSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPForSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
157
                                 Params &&... P) {
329
157
    void *Mem =
330
157
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
157
                                                 NumChildren),
332
157
                   alignof(T));
333
157
    auto *Data =
334
157
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
157
                                 HasAssociatedStmt, NumChildren);
336
157
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
157
    Inst->Data = Data;
338
157
    return Inst;
339
157
  }
clang::OMPParallelForDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelForDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
139
                                 Params &&... P) {
329
139
    void *Mem =
330
139
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
139
                                                 NumChildren),
332
139
                   alignof(T));
333
139
    auto *Data =
334
139
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
139
                                 HasAssociatedStmt, NumChildren);
336
139
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
139
    Inst->Data = Data;
338
139
    return Inst;
339
139
  }
clang::OMPParallelForSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelForSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
144
                                 Params &&... P) {
329
144
    void *Mem =
330
144
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
144
                                                 NumChildren),
332
144
                   alignof(T));
333
144
    auto *Data =
334
144
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
144
                                 HasAssociatedStmt, NumChildren);
336
144
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
144
    Inst->Data = Data;
338
144
    return Inst;
339
144
  }
clang::OMPTargetParallelForDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetParallelForDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
502
                                 Params &&... P) {
329
502
    void *Mem =
330
502
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
502
                                                 NumChildren),
332
502
                   alignof(T));
333
502
    auto *Data =
334
502
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
502
                                 HasAssociatedStmt, NumChildren);
336
502
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
502
    Inst->Data = Data;
338
502
    return Inst;
339
502
  }
clang::OMPTaskLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTaskLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
48
                                 Params &&... P) {
329
48
    void *Mem =
330
48
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
48
                                                 NumChildren),
332
48
                   alignof(T));
333
48
    auto *Data =
334
48
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
48
                                 HasAssociatedStmt, NumChildren);
336
48
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
48
    Inst->Data = Data;
338
48
    return Inst;
339
48
  }
clang::OMPTaskLoopSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTaskLoopSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
46
                                 Params &&... P) {
329
46
    void *Mem =
330
46
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
46
                                                 NumChildren),
332
46
                   alignof(T));
333
46
    auto *Data =
334
46
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
46
                                 HasAssociatedStmt, NumChildren);
336
46
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
46
    Inst->Data = Data;
338
46
    return Inst;
339
46
  }
clang::OMPMasterTaskLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPMasterTaskLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
36
                                 Params &&... P) {
329
36
    void *Mem =
330
36
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
36
                                                 NumChildren),
332
36
                   alignof(T));
333
36
    auto *Data =
334
36
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
36
                                 HasAssociatedStmt, NumChildren);
336
36
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
36
    Inst->Data = Data;
338
36
    return Inst;
339
36
  }
clang::OMPMaskedTaskLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPMaskedTaskLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
12
                                 Params &&... P) {
329
12
    void *Mem =
330
12
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
12
                                                 NumChildren),
332
12
                   alignof(T));
333
12
    auto *Data =
334
12
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
12
                                 HasAssociatedStmt, NumChildren);
336
12
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
12
    Inst->Data = Data;
338
12
    return Inst;
339
12
  }
clang::OMPMasterTaskLoopSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPMasterTaskLoopSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
50
                                 Params &&... P) {
329
50
    void *Mem =
330
50
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
50
                                                 NumChildren),
332
50
                   alignof(T));
333
50
    auto *Data =
334
50
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
50
                                 HasAssociatedStmt, NumChildren);
336
50
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
50
    Inst->Data = Data;
338
50
    return Inst;
339
50
  }
clang::OMPMaskedTaskLoopSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPMaskedTaskLoopSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
20
                                 Params &&... P) {
329
20
    void *Mem =
330
20
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
20
                                                 NumChildren),
332
20
                   alignof(T));
333
20
    auto *Data =
334
20
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
20
                                 HasAssociatedStmt, NumChildren);
336
20
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
20
    Inst->Data = Data;
338
20
    return Inst;
339
20
  }
clang::OMPParallelMasterTaskLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelMasterTaskLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
34
                                 Params &&... P) {
329
34
    void *Mem =
330
34
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
34
                                                 NumChildren),
332
34
                   alignof(T));
333
34
    auto *Data =
334
34
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
34
                                 HasAssociatedStmt, NumChildren);
336
34
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
34
    Inst->Data = Data;
338
34
    return Inst;
339
34
  }
clang::OMPParallelMaskedTaskLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelMaskedTaskLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
12
                                 Params &&... P) {
329
12
    void *Mem =
330
12
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
12
                                                 NumChildren),
332
12
                   alignof(T));
333
12
    auto *Data =
334
12
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
12
                                 HasAssociatedStmt, NumChildren);
336
12
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
12
    Inst->Data = Data;
338
12
    return Inst;
339
12
  }
clang::OMPParallelMasterTaskLoopSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelMasterTaskLoopSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
48
                                 Params &&... P) {
329
48
    void *Mem =
330
48
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
48
                                                 NumChildren),
332
48
                   alignof(T));
333
48
    auto *Data =
334
48
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
48
                                 HasAssociatedStmt, NumChildren);
336
48
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
48
    Inst->Data = Data;
338
48
    return Inst;
339
48
  }
clang::OMPParallelMaskedTaskLoopSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelMaskedTaskLoopSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
12
                                 Params &&... P) {
329
12
    void *Mem =
330
12
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
12
                                                 NumChildren),
332
12
                   alignof(T));
333
12
    auto *Data =
334
12
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
12
                                 HasAssociatedStmt, NumChildren);
336
12
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
12
    Inst->Data = Data;
338
12
    return Inst;
339
12
  }
clang::OMPDistributeDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPDistributeDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
147
                                 Params &&... P) {
329
147
    void *Mem =
330
147
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
147
                                                 NumChildren),
332
147
                   alignof(T));
333
147
    auto *Data =
334
147
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
147
                                 HasAssociatedStmt, NumChildren);
336
147
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
147
    Inst->Data = Data;
338
147
    return Inst;
339
147
  }
clang::OMPDistributeParallelForDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPDistributeParallelForDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
300
                                 Params &&... P) {
329
300
    void *Mem =
330
300
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
300
                                                 NumChildren),
332
300
                   alignof(T));
333
300
    auto *Data =
334
300
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
300
                                 HasAssociatedStmt, NumChildren);
336
300
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
300
    Inst->Data = Data;
338
300
    return Inst;
339
300
  }
clang::OMPDistributeParallelForSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPDistributeParallelForSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
280
                                 Params &&... P) {
329
280
    void *Mem =
330
280
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
280
                                                 NumChildren),
332
280
                   alignof(T));
333
280
    auto *Data =
334
280
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
280
                                 HasAssociatedStmt, NumChildren);
336
280
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
280
    Inst->Data = Data;
338
280
    return Inst;
339
280
  }
clang::OMPDistributeSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPDistributeSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
202
                                 Params &&... P) {
329
202
    void *Mem =
330
202
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
202
                                                 NumChildren),
332
202
                   alignof(T));
333
202
    auto *Data =
334
202
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
202
                                 HasAssociatedStmt, NumChildren);
336
202
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
202
    Inst->Data = Data;
338
202
    return Inst;
339
202
  }
clang::OMPTargetParallelForSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetParallelForSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
676
                                 Params &&... P) {
329
676
    void *Mem =
330
676
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
676
                                                 NumChildren),
332
676
                   alignof(T));
333
676
    auto *Data =
334
676
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
676
                                 HasAssociatedStmt, NumChildren);
336
676
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
676
    Inst->Data = Data;
338
676
    return Inst;
339
676
  }
clang::OMPTargetSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
634
                                 Params &&... P) {
329
634
    void *Mem =
330
634
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
634
                                                 NumChildren),
332
634
                   alignof(T));
333
634
    auto *Data =
334
634
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
634
                                 HasAssociatedStmt, NumChildren);
336
634
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
634
    Inst->Data = Data;
338
634
    return Inst;
339
634
  }
clang::OMPTeamsDistributeDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTeamsDistributeDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
142
                                 Params &&... P) {
329
142
    void *Mem =
330
142
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
142
                                                 NumChildren),
332
142
                   alignof(T));
333
142
    auto *Data =
334
142
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
142
                                 HasAssociatedStmt, NumChildren);
336
142
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
142
    Inst->Data = Data;
338
142
    return Inst;
339
142
  }
clang::OMPTeamsDistributeSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTeamsDistributeSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
246
                                 Params &&... P) {
329
246
    void *Mem =
330
246
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
246
                                                 NumChildren),
332
246
                   alignof(T));
333
246
    auto *Data =
334
246
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
246
                                 HasAssociatedStmt, NumChildren);
336
246
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
246
    Inst->Data = Data;
338
246
    return Inst;
339
246
  }
clang::OMPTeamsDistributeParallelForSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTeamsDistributeParallelForSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
410
                                 Params &&... P) {
329
410
    void *Mem =
330
410
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
410
                                                 NumChildren),
332
410
                   alignof(T));
333
410
    auto *Data =
334
410
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
410
                                 HasAssociatedStmt, NumChildren);
336
410
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
410
    Inst->Data = Data;
338
410
    return Inst;
339
410
  }
clang::OMPTeamsDistributeParallelForDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTeamsDistributeParallelForDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
366
                                 Params &&... P) {
329
366
    void *Mem =
330
366
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
366
                                                 NumChildren),
332
366
                   alignof(T));
333
366
    auto *Data =
334
366
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
366
                                 HasAssociatedStmt, NumChildren);
336
366
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
366
    Inst->Data = Data;
338
366
    return Inst;
339
366
  }
clang::OMPTargetTeamsDistributeDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetTeamsDistributeDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
537
                                 Params &&... P) {
329
537
    void *Mem =
330
537
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
537
                                                 NumChildren),
332
537
                   alignof(T));
333
537
    auto *Data =
334
537
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
537
                                 HasAssociatedStmt, NumChildren);
336
537
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
537
    Inst->Data = Data;
338
537
    return Inst;
339
537
  }
clang::OMPTargetTeamsDistributeParallelForDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetTeamsDistributeParallelForDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
434
                                 Params &&... P) {
329
434
    void *Mem =
330
434
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
434
                                                 NumChildren),
332
434
                   alignof(T));
333
434
    auto *Data =
334
434
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
434
                                 HasAssociatedStmt, NumChildren);
336
434
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
434
    Inst->Data = Data;
338
434
    return Inst;
339
434
  }
clang::OMPTargetTeamsDistributeParallelForSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetTeamsDistributeParallelForSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
633
                                 Params &&... P) {
329
633
    void *Mem =
330
633
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
633
                                                 NumChildren),
332
633
                   alignof(T));
333
633
    auto *Data =
334
633
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
633
                                 HasAssociatedStmt, NumChildren);
336
633
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
633
    Inst->Data = Data;
338
633
    return Inst;
339
633
  }
clang::OMPTargetTeamsDistributeSimdDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetTeamsDistributeSimdDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
587
                                 Params &&... P) {
329
587
    void *Mem =
330
587
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
587
                                                 NumChildren),
332
587
                   alignof(T));
333
587
    auto *Data =
334
587
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
587
                                 HasAssociatedStmt, NumChildren);
336
587
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
587
    Inst->Data = Data;
338
587
    return Inst;
339
587
  }
Unexecuted instantiation: clang::OMPGenericLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPGenericLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
clang::OMPTeamsGenericLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTeamsGenericLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
63
                                 Params &&... P) {
329
63
    void *Mem =
330
63
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
63
                                                 NumChildren),
332
63
                   alignof(T));
333
63
    auto *Data =
334
63
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
63
                                 HasAssociatedStmt, NumChildren);
336
63
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
63
    Inst->Data = Data;
338
63
    return Inst;
339
63
  }
clang::OMPTargetTeamsGenericLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetTeamsGenericLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
144
                                 Params &&... P) {
329
144
    void *Mem =
330
144
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
144
                                                 NumChildren),
332
144
                   alignof(T));
333
144
    auto *Data =
334
144
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
144
                                 HasAssociatedStmt, NumChildren);
336
144
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
144
    Inst->Data = Data;
338
144
    return Inst;
339
144
  }
clang::OMPParallelGenericLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelGenericLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
8
                                 Params &&... P) {
329
8
    void *Mem =
330
8
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
8
                                                 NumChildren),
332
8
                   alignof(T));
333
8
    auto *Data =
334
8
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
8
                                 HasAssociatedStmt, NumChildren);
336
8
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
8
    Inst->Data = Data;
338
8
    return Inst;
339
8
  }
clang::OMPTargetParallelGenericLoopDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetParallelGenericLoopDirective, unsigned int&>(clang::ASTContext const&, unsigned int, bool, unsigned int, unsigned int&)
Line
Count
Source
328
211
                                 Params &&... P) {
329
211
    void *Mem =
330
211
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
331
211
                                                 NumChildren),
332
211
                   alignof(T));
333
211
    auto *Data =
334
211
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
335
211
                                 HasAssociatedStmt, NumChildren);
336
211
    auto *Inst = new (Mem) T(std::forward<Params>(P)...);
337
211
    Inst->Data = Data;
338
211
    return Inst;
339
211
  }
340
341
  template <typename T>
342
  static T *createEmptyDirective(const ASTContext &C, unsigned NumClauses,
343
                                 bool HasAssociatedStmt = false,
344
17.4k
                                 unsigned NumChildren = 0) {
345
17.4k
    void *Mem =
346
17.4k
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
17.4k
                                                 NumChildren),
348
17.4k
                   alignof(T));
349
17.4k
    auto *Data =
350
17.4k
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
17.4k
                                 HasAssociatedStmt, NumChildren);
352
17.4k
    auto *Inst = new (Mem) T;
353
17.4k
    Inst->Data = Data;
354
17.4k
    return Inst;
355
17.4k
  }
Unexecuted instantiation: clang::OMPMetaDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPMetaDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
clang::OMPParallelDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
843
                                 unsigned NumChildren = 0) {
345
843
    void *Mem =
346
843
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
843
                                                 NumChildren),
348
843
                   alignof(T));
349
843
    auto *Data =
350
843
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
843
                                 HasAssociatedStmt, NumChildren);
352
843
    auto *Inst = new (Mem) T;
353
843
    Inst->Data = Data;
354
843
    return Inst;
355
843
  }
clang::OMPSectionsDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPSectionsDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
58
                                 unsigned NumChildren = 0) {
345
58
    void *Mem =
346
58
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
58
                                                 NumChildren),
348
58
                   alignof(T));
349
58
    auto *Data =
350
58
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
58
                                 HasAssociatedStmt, NumChildren);
352
58
    auto *Inst = new (Mem) T;
353
58
    Inst->Data = Data;
354
58
    return Inst;
355
58
  }
clang::OMPSectionDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPSectionDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
50
                                 unsigned NumChildren = 0) {
345
50
    void *Mem =
346
50
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
50
                                                 NumChildren),
348
50
                   alignof(T));
349
50
    auto *Data =
350
50
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
50
                                 HasAssociatedStmt, NumChildren);
352
50
    auto *Inst = new (Mem) T;
353
50
    Inst->Data = Data;
354
50
    return Inst;
355
50
  }
clang::OMPScopeDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPScopeDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
4
                                 unsigned NumChildren = 0) {
345
4
    void *Mem =
346
4
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
4
                                                 NumChildren),
348
4
                   alignof(T));
349
4
    auto *Data =
350
4
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
4
                                 HasAssociatedStmt, NumChildren);
352
4
    auto *Inst = new (Mem) T;
353
4
    Inst->Data = Data;
354
4
    return Inst;
355
4
  }
clang::OMPSingleDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPSingleDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
46
                                 unsigned NumChildren = 0) {
345
46
    void *Mem =
346
46
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
46
                                                 NumChildren),
348
46
                   alignof(T));
349
46
    auto *Data =
350
46
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
46
                                 HasAssociatedStmt, NumChildren);
352
46
    auto *Inst = new (Mem) T;
353
46
    Inst->Data = Data;
354
46
    return Inst;
355
46
  }
clang::OMPMasterDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPMasterDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
17
                                 unsigned NumChildren = 0) {
345
17
    void *Mem =
346
17
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
17
                                                 NumChildren),
348
17
                   alignof(T));
349
17
    auto *Data =
350
17
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
17
                                 HasAssociatedStmt, NumChildren);
352
17
    auto *Inst = new (Mem) T;
353
17
    Inst->Data = Data;
354
17
    return Inst;
355
17
  }
clang::OMPCriticalDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPCriticalDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
78
                                 unsigned NumChildren = 0) {
345
78
    void *Mem =
346
78
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
78
                                                 NumChildren),
348
78
                   alignof(T));
349
78
    auto *Data =
350
78
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
78
                                 HasAssociatedStmt, NumChildren);
352
78
    auto *Inst = new (Mem) T;
353
78
    Inst->Data = Data;
354
78
    return Inst;
355
78
  }
clang::OMPParallelMasterDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelMasterDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
63
                                 unsigned NumChildren = 0) {
345
63
    void *Mem =
346
63
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
63
                                                 NumChildren),
348
63
                   alignof(T));
349
63
    auto *Data =
350
63
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
63
                                 HasAssociatedStmt, NumChildren);
352
63
    auto *Inst = new (Mem) T;
353
63
    Inst->Data = Data;
354
63
    return Inst;
355
63
  }
clang::OMPParallelMaskedDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelMaskedDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
44
                                 unsigned NumChildren = 0) {
345
44
    void *Mem =
346
44
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
44
                                                 NumChildren),
348
44
                   alignof(T));
349
44
    auto *Data =
350
44
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
44
                                 HasAssociatedStmt, NumChildren);
352
44
    auto *Inst = new (Mem) T;
353
44
    Inst->Data = Data;
354
44
    return Inst;
355
44
  }
clang::OMPParallelSectionsDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPParallelSectionsDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
32
                                 unsigned NumChildren = 0) {
345
32
    void *Mem =
346
32
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
32
                                                 NumChildren),
348
32
                   alignof(T));
349
32
    auto *Data =
350
32
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
32
                                 HasAssociatedStmt, NumChildren);
352
32
    auto *Inst = new (Mem) T;
353
32
    Inst->Data = Data;
354
32
    return Inst;
355
32
  }
clang::OMPTaskDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTaskDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
257
                                 unsigned NumChildren = 0) {
345
257
    void *Mem =
346
257
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
257
                                                 NumChildren),
348
257
                   alignof(T));
349
257
    auto *Data =
350
257
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
257
                                 HasAssociatedStmt, NumChildren);
352
257
    auto *Inst = new (Mem) T;
353
257
    Inst->Data = Data;
354
257
    return Inst;
355
257
  }
clang::OMPErrorDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPErrorDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
10
                                 unsigned NumChildren = 0) {
345
10
    void *Mem =
346
10
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
10
                                                 NumChildren),
348
10
                   alignof(T));
349
10
    auto *Data =
350
10
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
10
                                 HasAssociatedStmt, NumChildren);
352
10
    auto *Inst = new (Mem) T;
353
10
    Inst->Data = Data;
354
10
    return Inst;
355
10
  }
clang::OMPTaskwaitDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTaskwaitDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
38
                                 unsigned NumChildren = 0) {
345
38
    void *Mem =
346
38
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
38
                                                 NumChildren),
348
38
                   alignof(T));
349
38
    auto *Data =
350
38
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
38
                                 HasAssociatedStmt, NumChildren);
352
38
    auto *Inst = new (Mem) T;
353
38
    Inst->Data = Data;
354
38
    return Inst;
355
38
  }
clang::OMPTaskgroupDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTaskgroupDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
114
                                 unsigned NumChildren = 0) {
345
114
    void *Mem =
346
114
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
114
                                                 NumChildren),
348
114
                   alignof(T));
349
114
    auto *Data =
350
114
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
114
                                 HasAssociatedStmt, NumChildren);
352
114
    auto *Inst = new (Mem) T;
353
114
    Inst->Data = Data;
354
114
    return Inst;
355
114
  }
clang::OMPCancelDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPCancelDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
176
                                 unsigned NumChildren = 0) {
345
176
    void *Mem =
346
176
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
176
                                                 NumChildren),
348
176
                   alignof(T));
349
176
    auto *Data =
350
176
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
176
                                 HasAssociatedStmt, NumChildren);
352
176
    auto *Inst = new (Mem) T;
353
176
    Inst->Data = Data;
354
176
    return Inst;
355
176
  }
clang::OMPFlushDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPFlushDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
50
                                 unsigned NumChildren = 0) {
345
50
    void *Mem =
346
50
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
50
                                                 NumChildren),
348
50
                   alignof(T));
349
50
    auto *Data =
350
50
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
50
                                 HasAssociatedStmt, NumChildren);
352
50
    auto *Inst = new (Mem) T;
353
50
    Inst->Data = Data;
354
50
    return Inst;
355
50
  }
clang::OMPDepobjDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPDepobjDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
28
                                 unsigned NumChildren = 0) {
345
28
    void *Mem =
346
28
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
28
                                                 NumChildren),
348
28
                   alignof(T));
349
28
    auto *Data =
350
28
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
28
                                 HasAssociatedStmt, NumChildren);
352
28
    auto *Inst = new (Mem) T;
353
28
    Inst->Data = Data;
354
28
    return Inst;
355
28
  }
clang::OMPScanDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPScanDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
24
                                 unsigned NumChildren = 0) {
345
24
    void *Mem =
346
24
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
24
                                                 NumChildren),
348
24
                   alignof(T));
349
24
    auto *Data =
350
24
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
24
                                 HasAssociatedStmt, NumChildren);
352
24
    auto *Inst = new (Mem) T;
353
24
    Inst->Data = Data;
354
24
    return Inst;
355
24
  }
clang::OMPOrderedDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPOrderedDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
114
                                 unsigned NumChildren = 0) {
345
114
    void *Mem =
346
114
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
114
                                                 NumChildren),
348
114
                   alignof(T));
349
114
    auto *Data =
350
114
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
114
                                 HasAssociatedStmt, NumChildren);
352
114
    auto *Inst = new (Mem) T;
353
114
    Inst->Data = Data;
354
114
    return Inst;
355
114
  }
clang::OMPAtomicDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPAtomicDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
6.29k
                                 unsigned NumChildren = 0) {
345
6.29k
    void *Mem =
346
6.29k
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
6.29k
                                                 NumChildren),
348
6.29k
                   alignof(T));
349
6.29k
    auto *Data =
350
6.29k
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
6.29k
                                 HasAssociatedStmt, NumChildren);
352
6.29k
    auto *Inst = new (Mem) T;
353
6.29k
    Inst->Data = Data;
354
6.29k
    return Inst;
355
6.29k
  }
clang::OMPTargetDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
5.17k
                                 unsigned NumChildren = 0) {
345
5.17k
    void *Mem =
346
5.17k
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
5.17k
                                                 NumChildren),
348
5.17k
                   alignof(T));
349
5.17k
    auto *Data =
350
5.17k
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
5.17k
                                 HasAssociatedStmt, NumChildren);
352
5.17k
    auto *Inst = new (Mem) T;
353
5.17k
    Inst->Data = Data;
354
5.17k
    return Inst;
355
5.17k
  }
clang::OMPTargetParallelDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetParallelDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
618
                                 unsigned NumChildren = 0) {
345
618
    void *Mem =
346
618
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
618
                                                 NumChildren),
348
618
                   alignof(T));
349
618
    auto *Data =
350
618
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
618
                                 HasAssociatedStmt, NumChildren);
352
618
    auto *Inst = new (Mem) T;
353
618
    Inst->Data = Data;
354
618
    return Inst;
355
618
  }
clang::OMPTargetDataDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetDataDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
277
                                 unsigned NumChildren = 0) {
345
277
    void *Mem =
346
277
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
277
                                                 NumChildren),
348
277
                   alignof(T));
349
277
    auto *Data =
350
277
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
277
                                 HasAssociatedStmt, NumChildren);
352
277
    auto *Inst = new (Mem) T;
353
277
    Inst->Data = Data;
354
277
    return Inst;
355
277
  }
clang::OMPTargetEnterDataDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetEnterDataDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
343
                                 unsigned NumChildren = 0) {
345
343
    void *Mem =
346
343
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
343
                                                 NumChildren),
348
343
                   alignof(T));
349
343
    auto *Data =
350
343
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
343
                                 HasAssociatedStmt, NumChildren);
352
343
    auto *Inst = new (Mem) T;
353
343
    Inst->Data = Data;
354
343
    return Inst;
355
343
  }
clang::OMPTargetExitDataDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetExitDataDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
335
                                 unsigned NumChildren = 0) {
345
335
    void *Mem =
346
335
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
335
                                                 NumChildren),
348
335
                   alignof(T));
349
335
    auto *Data =
350
335
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
335
                                 HasAssociatedStmt, NumChildren);
352
335
    auto *Inst = new (Mem) T;
353
335
    Inst->Data = Data;
354
335
    return Inst;
355
335
  }
clang::OMPTeamsDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTeamsDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
1.03k
                                 unsigned NumChildren = 0) {
345
1.03k
    void *Mem =
346
1.03k
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
1.03k
                                                 NumChildren),
348
1.03k
                   alignof(T));
349
1.03k
    auto *Data =
350
1.03k
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
1.03k
                                 HasAssociatedStmt, NumChildren);
352
1.03k
    auto *Inst = new (Mem) T;
353
1.03k
    Inst->Data = Data;
354
1.03k
    return Inst;
355
1.03k
  }
clang::OMPTargetUpdateDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetUpdateDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
406
                                 unsigned NumChildren = 0) {
345
406
    void *Mem =
346
406
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
406
                                                 NumChildren),
348
406
                   alignof(T));
349
406
    auto *Data =
350
406
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
406
                                 HasAssociatedStmt, NumChildren);
352
406
    auto *Inst = new (Mem) T;
353
406
    Inst->Data = Data;
354
406
    return Inst;
355
406
  }
clang::OMPTargetTeamsDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPTargetTeamsDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
763
                                 unsigned NumChildren = 0) {
345
763
    void *Mem =
346
763
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
763
                                                 NumChildren),
348
763
                   alignof(T));
349
763
    auto *Data =
350
763
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
763
                                 HasAssociatedStmt, NumChildren);
352
763
    auto *Inst = new (Mem) T;
353
763
    Inst->Data = Data;
354
763
    return Inst;
355
763
  }
clang::OMPInteropDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPInteropDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
68
                                 unsigned NumChildren = 0) {
345
68
    void *Mem =
346
68
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
68
                                                 NumChildren),
348
68
                   alignof(T));
349
68
    auto *Data =
350
68
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
68
                                 HasAssociatedStmt, NumChildren);
352
68
    auto *Inst = new (Mem) T;
353
68
    Inst->Data = Data;
354
68
    return Inst;
355
68
  }
clang::OMPDispatchDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPDispatchDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
40
                                 unsigned NumChildren = 0) {
345
40
    void *Mem =
346
40
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
40
                                                 NumChildren),
348
40
                   alignof(T));
349
40
    auto *Data =
350
40
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
40
                                 HasAssociatedStmt, NumChildren);
352
40
    auto *Inst = new (Mem) T;
353
40
    Inst->Data = Data;
354
40
    return Inst;
355
40
  }
clang::OMPMaskedDirective* clang::OMPExecutableDirective::createEmptyDirective<clang::OMPMaskedDirective>(clang::ASTContext const&, unsigned int, bool, unsigned int)
Line
Count
Source
344
30
                                 unsigned NumChildren = 0) {
345
30
    void *Mem =
346
30
        C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
347
30
                                                 NumChildren),
348
30
                   alignof(T));
349
30
    auto *Data =
350
30
        OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
351
30
                                 HasAssociatedStmt, NumChildren);
352
30
    auto *Inst = new (Mem) T;
353
30
    Inst->Data = Data;
354
30
    return Inst;
355
30
  }
356
357
46.3k
  void setMappedDirective(OpenMPDirectiveKind MappedDirective) {
358
46.3k
    PrevMappedDirective = MappedDirective;
359
46.3k
  }
360
361
public:
362
  /// Iterates over expressions/statements used in the construct.
363
  class used_clauses_child_iterator
364
      : public llvm::iterator_adaptor_base<
365
            used_clauses_child_iterator, ArrayRef<OMPClause *>::iterator,
366
            std::forward_iterator_tag, Stmt *, ptrdiff_t, Stmt *, Stmt *> {
367
    ArrayRef<OMPClause *>::iterator End;
368
    OMPClause::child_iterator ChildI, ChildEnd;
369
370
87.0k
    void MoveToNext() {
371
87.0k
      if (ChildI != ChildEnd)
372
31.5k
        return;
373
86.0k
      
while (55.5k
this->I != End) {
374
37.4k
        ++this->I;
375
37.4k
        if (this->I != End) {
376
22.9k
          ChildI = (*this->I)->used_children().begin();
377
22.9k
          ChildEnd = (*this->I)->used_children().end();
378
22.9k
          if (ChildI != ChildEnd)
379
6.97k
            return;
380
22.9k
        }
381
37.4k
      }
382
55.5k
    }
383
384
  public:
385
    explicit used_clauses_child_iterator(ArrayRef<OMPClause *> Clauses)
386
72.2k
        : used_clauses_child_iterator::iterator_adaptor_base(Clauses.begin()),
387
72.2k
          End(Clauses.end()) {
388
72.2k
      if (this->I != End) {
389
32.5k
        ChildI = (*this->I)->used_children().begin();
390
32.5k
        ChildEnd = (*this->I)->used_children().end();
391
32.5k
        MoveToNext();
392
32.5k
      }
393
72.2k
    }
394
38.0k
    Stmt *operator*() const { return *ChildI; }
395
0
    Stmt *operator->() const { return **this; }
396
397
70.6k
    used_clauses_child_iterator &operator++() {
398
70.6k
      ++ChildI;
399
70.6k
      if (ChildI != ChildEnd)
400
16.1k
        return *this;
401
54.4k
      if (this->I != End) {
402
54.4k
        ++this->I;
403
54.4k
        if (this->I != End) {
404
20.4k
          ChildI = (*this->I)->used_children().begin();
405
20.4k
          ChildEnd = (*this->I)->used_children().end();
406
20.4k
        }
407
54.4k
      }
408
54.4k
      MoveToNext();
409
54.4k
      return *this;
410
70.6k
    }
411
  };
412
413
  static llvm::iterator_range<used_clauses_child_iterator>
414
36.1k
  used_clauses_children(ArrayRef<OMPClause *> Clauses) {
415
36.1k
    return {
416
36.1k
        used_clauses_child_iterator(Clauses),
417
36.1k
        used_clauses_child_iterator(llvm::ArrayRef(Clauses.end(), (size_t)0))};
418
36.1k
  }
419
420
  /// Iterates over a filtered subrange of clauses applied to a
421
  /// directive.
422
  ///
423
  /// This iterator visits only clauses of type SpecificClause.
424
  template <typename SpecificClause>
425
  class specific_clause_iterator
426
      : public llvm::iterator_adaptor_base<
427
            specific_clause_iterator<SpecificClause>,
428
            ArrayRef<OMPClause *>::const_iterator, std::forward_iterator_tag,
429
            const SpecificClause *, ptrdiff_t, const SpecificClause *,
430
            const SpecificClause *> {
431
    ArrayRef<OMPClause *>::const_iterator End;
432
433
3.19M
    void SkipToNextClause() {
434
4.69M
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.57M
)
435
1.49M
        ++this->I;
436
3.19M
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::SkipToNextClause()
Line
Count
Source
433
461k
    void SkipToNextClause() {
434
614k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)160k
)
435
153k
        ++this->I;
436
461k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::SkipToNextClause()
Line
Count
Source
433
210k
    void SkipToNextClause() {
434
307k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)99.2k
)
435
97.7k
        ++this->I;
436
210k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPBindClause>::SkipToNextClause()
Line
Count
Source
433
1.00M
    void SkipToNextClause() {
434
1.26M
      while (this->I != End && 
!isa<SpecificClause>(*this->I)263k
)
435
263k
        ++this->I;
436
1.00M
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::SkipToNextClause()
Line
Count
Source
433
236
    void SkipToNextClause() {
434
236
      while (this->I != End && 
!isa<SpecificClause>(*this->I)12
)
435
0
        ++this->I;
436
236
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAtClause>::SkipToNextClause()
Line
Count
Source
433
422
    void SkipToNextClause() {
434
572
      while (this->I != End && 
!isa<SpecificClause>(*this->I)236
)
435
150
        ++this->I;
436
422
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeverityClause>::SkipToNextClause()
Line
Count
Source
433
427
    void SkipToNextClause() {
434
585
      while (this->I != End && 
!isa<SpecificClause>(*this->I)247
)
435
158
        ++this->I;
436
427
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMessageClause>::SkipToNextClause()
Line
Count
Source
433
409
    void SkipToNextClause() {
434
585
      while (this->I != End && 
!isa<SpecificClause>(*this->I)247
)
435
176
        ++this->I;
436
409
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::SkipToNextClause()
Line
Count
Source
433
46.8k
    void SkipToNextClause() {
434
77.7k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)32.0k
)
435
30.9k
        ++this->I;
436
46.8k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::SkipToNextClause()
Line
Count
Source
433
28.3k
    void SkipToNextClause() {
434
46.7k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)20.0k
)
435
18.4k
        ++this->I;
436
28.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSizesClause>::SkipToNextClause()
Line
Count
Source
433
180
    void SkipToNextClause() {
434
180
      while (this->I != End && 
!isa<SpecificClause>(*this->I)79
)
435
0
        ++this->I;
436
180
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFullClause>::SkipToNextClause()
Line
Count
Source
433
255
    void SkipToNextClause() {
434
332
      while (this->I != End && 
!isa<SpecificClause>(*this->I)93
)
435
77
        ++this->I;
436
255
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPartialClause>::SkipToNextClause()
Line
Count
Source
433
313
    void SkipToNextClause() {
434
326
      while (this->I != End && 
!isa<SpecificClause>(*this->I)90
)
435
13
        ++this->I;
436
313
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDetachClause>::SkipToNextClause()
Line
Count
Source
433
4.23k
    void SkipToNextClause() {
434
9.64k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)5.41k
)
435
5.41k
        ++this->I;
436
4.23k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::SkipToNextClause()
Line
Count
Source
433
21.6k
    void SkipToNextClause() {
434
37.2k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)16.0k
)
435
15.6k
        ++this->I;
436
21.6k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAffinityClause>::SkipToNextClause()
Line
Count
Source
433
2.24k
    void SkipToNextClause() {
434
4.99k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)2.80k
)
435
2.74k
        ++this->I;
436
2.24k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUsesAllocatorsClause>::SkipToNextClause()
Line
Count
Source
433
42.8k
    void SkipToNextClause() {
434
73.7k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)31.0k
)
435
30.9k
        ++this->I;
436
42.8k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXAttributeClause>::SkipToNextClause()
Line
Count
Source
433
26.1k
    void SkipToNextClause() {
434
45.0k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)19.0k
)
435
18.9k
        ++this->I;
436
26.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::SkipToNextClause()
Line
Count
Source
433
22.2k
    void SkipToNextClause() {
434
35.4k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)14.2k
)
435
13.1k
        ++this->I;
436
22.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::SkipToNextClause()
Line
Count
Source
433
61.9k
    void SkipToNextClause() {
434
95.7k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)39.6k
)
435
33.8k
        ++this->I;
436
61.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::SkipToNextClause()
Line
Count
Source
433
20.4k
    void SkipToNextClause() {
434
33.3k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)13.5k
)
435
12.8k
        ++this->I;
436
20.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::SkipToNextClause()
Line
Count
Source
433
43.9k
    void SkipToNextClause() {
434
71.6k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)28.5k
)
435
27.7k
        ++this->I;
436
43.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::SkipToNextClause()
Line
Count
Source
433
160k
    void SkipToNextClause() {
434
232k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)96.0k
)
435
71.9k
        ++this->I;
436
160k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXDynCGroupMemClause>::SkipToNextClause()
Line
Count
Source
433
18.0k
    void SkipToNextClause() {
434
30.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)12.5k
)
435
12.5k
        ++this->I;
436
18.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::SkipToNextClause()
Line
Count
Source
433
21.8k
    void SkipToNextClause() {
434
38.9k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)17.1k
)
435
17.0k
        ++this->I;
436
21.8k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::SkipToNextClause()
Line
Count
Source
433
19.2k
    void SkipToNextClause() {
434
32.6k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)13.5k
)
435
13.4k
        ++this->I;
436
19.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHasDeviceAddrClause>::SkipToNextClause()
Line
Count
Source
433
19.1k
    void SkipToNextClause() {
434
32.6k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)13.5k
)
435
13.5k
        ++this->I;
436
19.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::SkipToNextClause()
Line
Count
Source
433
56.1k
    void SkipToNextClause() {
434
80.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)36.8k
)
435
24.4k
        ++this->I;
436
56.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::SkipToNextClause()
Line
Count
Source
433
28.3k
    void SkipToNextClause() {
434
48.8k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)20.8k
)
435
20.5k
        ++this->I;
436
28.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::SkipToNextClause()
Line
Count
Source
433
147k
    void SkipToNextClause() {
434
242k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)97.1k
)
435
94.4k
        ++this->I;
436
147k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::SkipToNextClause()
Line
Count
Source
433
160k
    void SkipToNextClause() {
434
268k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)111k
)
435
108k
        ++this->I;
436
160k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::SkipToNextClause()
Line
Count
Source
433
247k
    void SkipToNextClause() {
434
411k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)170k
)
435
163k
        ++this->I;
436
247k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::SkipToNextClause()
Line
Count
Source
433
144k
    void SkipToNextClause() {
434
245k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)103k
)
435
101k
        ++this->I;
436
144k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXBareClause>::SkipToNextClause()
Line
Count
Source
433
3.09k
    void SkipToNextClause() {
434
5.08k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)1.99k
)
435
1.98k
        ++this->I;
436
3.09k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::SkipToNextClause()
Line
Count
Source
433
17.3k
    void SkipToNextClause() {
434
29.9k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)12.8k
)
435
12.6k
        ++this->I;
436
17.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::SkipToNextClause()
Line
Count
Source
433
17.3k
    void SkipToNextClause() {
434
29.9k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)12.8k
)
435
12.6k
        ++this->I;
436
17.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::SkipToNextClause()
Line
Count
Source
433
28.0k
    void SkipToNextClause() {
434
47.9k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)20.2k
)
435
19.9k
        ++this->I;
436
28.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::SkipToNextClause()
Line
Count
Source
433
2.84k
    void SkipToNextClause() {
434
3.62k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)807
)
435
775
        ++this->I;
436
2.84k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::SkipToNextClause()
Line
Count
Source
433
13.2k
    void SkipToNextClause() {
434
21.6k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8.50k
)
435
8.41k
        ++this->I;
436
13.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::SkipToNextClause()
Line
Count
Source
433
23.1k
    void SkipToNextClause() {
434
40.2k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)17.0k
)
435
17.0k
        ++this->I;
436
23.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::SkipToNextClause()
Line
Count
Source
433
11.2k
    void SkipToNextClause() {
434
17.3k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)7.03k
)
435
6.05k
        ++this->I;
436
11.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::SkipToNextClause()
Line
Count
Source
433
158
    void SkipToNextClause() {
434
177
      while (this->I != End && 
!isa<SpecificClause>(*this->I)47
)
435
19
        ++this->I;
436
158
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFilterClause>::SkipToNextClause()
Line
Count
Source
433
120
    void SkipToNextClause() {
434
120
      while (this->I != End && 
!isa<SpecificClause>(*this->I)32
)
435
0
        ++this->I;
436
120
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::SkipToNextClause()
Line
Count
Source
433
1.05k
    void SkipToNextClause() {
434
1.86k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)844
)
435
803
        ++this->I;
436
1.05k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::SkipToNextClause()
Line
Count
Source
433
1.04k
    void SkipToNextClause() {
434
1.86k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)844
)
435
818
        ++this->I;
436
1.04k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::SkipToNextClause()
Line
Count
Source
433
598
    void SkipToNextClause() {
434
1.02k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)457
)
435
423
        ++this->I;
436
598
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::SkipToNextClause()
Line
Count
Source
433
90
    void SkipToNextClause() {
434
93
      while (this->I != End && 
!isa<SpecificClause>(*this->I)33
)
435
3
        ++this->I;
436
90
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::SkipToNextClause()
Line
Count
Source
433
176
    void SkipToNextClause() {
434
224
      while (this->I != End && 
!isa<SpecificClause>(*this->I)64
)
435
48
        ++this->I;
436
176
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDepobjClause>::SkipToNextClause()
Line
Count
Source
433
42
    void SkipToNextClause() {
434
56
      while (this->I != End && 
!isa<SpecificClause>(*this->I)28
)
435
14
        ++this->I;
436
42
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDestroyClause>::SkipToNextClause()
Line
Count
Source
433
42
    void SkipToNextClause() {
434
88
      while (this->I != End && 
!isa<SpecificClause>(*this->I)52
)
435
46
        ++this->I;
436
42
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUpdateClause>::SkipToNextClause()
Line
Count
Source
433
12
    void SkipToNextClause() {
434
16
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8
)
435
4
        ++this->I;
436
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInclusiveClause>::SkipToNextClause()
Line
Count
Source
433
96
    void SkipToNextClause() {
434
120
      while (this->I != End && 
!isa<SpecificClause>(*this->I)48
)
435
24
        ++this->I;
436
96
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::SkipToNextClause()
Line
Count
Source
433
9.64k
    void SkipToNextClause() {
434
16.0k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)6.80k
)
435
6.35k
        ++this->I;
436
9.64k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDoacrossClause>::SkipToNextClause()
Line
Count
Source
433
202
    void SkipToNextClause() {
434
257
      while (this->I != End && 
!isa<SpecificClause>(*this->I)79
)
435
55
        ++this->I;
436
202
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::SkipToNextClause()
Line
Count
Source
433
119
    void SkipToNextClause() {
434
135
      while (this->I != End && 
!isa<SpecificClause>(*this->I)33
)
435
16
        ++this->I;
436
119
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::SkipToNextClause()
Line
Count
Source
433
12.2k
    void SkipToNextClause() {
434
24.6k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)13.3k
)
435
12.4k
        ++this->I;
436
12.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::SkipToNextClause()
Line
Count
Source
433
10.3k
    void SkipToNextClause() {
434
20.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)11.0k
)
435
10.1k
        ++this->I;
436
10.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::SkipToNextClause()
Line
Count
Source
433
8.69k
    void SkipToNextClause() {
434
16.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8.73k
)
435
7.88k
        ++this->I;
436
8.69k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::SkipToNextClause()
Line
Count
Source
433
6.98k
    void SkipToNextClause() {
434
12.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)6.45k
)
435
5.59k
        ++this->I;
436
6.98k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::SkipToNextClause()
Line
Count
Source
433
5.28k
    void SkipToNextClause() {
434
8.57k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)4.16k
)
435
3.29k
        ++this->I;
436
5.28k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInitClause>::SkipToNextClause()
Line
Count
Source
433
44
    void SkipToNextClause() {
434
84
      while (this->I != End && 
!isa<SpecificClause>(*this->I)48
)
435
40
        ++this->I;
436
44
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseClause>::SkipToNextClause()
Line
Count
Source
433
24
    void SkipToNextClause() {
434
48
      while (this->I != End && 
!isa<SpecificClause>(*this->I)32
)
435
24
        ++this->I;
436
24
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::SkipToNextClause()
Line
Count
Source
433
270
    void SkipToNextClause() {
434
375
      while (this->I != End && 
!isa<SpecificClause>(*this->I)191
)
435
105
        ++this->I;
436
270
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDeviceAddrClause>::SkipToNextClause()
Line
Count
Source
433
193
    void SkipToNextClause() {
434
375
      while (this->I != End && 
!isa<SpecificClause>(*this->I)191
)
435
182
        ++this->I;
436
193
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::SkipToNextClause()
Line
Count
Source
433
472
    void SkipToNextClause() {
434
841
      while (this->I != End && 
!isa<SpecificClause>(*this->I)387
)
435
369
        ++this->I;
436
472
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::SkipToNextClause()
Line
Count
Source
433
472
    void SkipToNextClause() {
434
841
      while (this->I != End && 
!isa<SpecificClause>(*this->I)387
)
435
369
        ++this->I;
436
472
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::SkipToNextClause()
Line
Count
Source
433
455
    void SkipToNextClause() {
434
757
      while (this->I != End && 
!isa<SpecificClause>(*this->I)339
)
435
302
        ++this->I;
436
455
    }
437
438
  public:
439
    explicit specific_clause_iterator(ArrayRef<OMPClause *> Clauses)
440
3.13M
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
3.13M
          End(Clauses.end()) {
442
3.13M
      SkipToNextClause();
443
3.13M
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
461k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
461k
          End(Clauses.end()) {
442
461k
      SkipToNextClause();
443
461k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
209k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
209k
          End(Clauses.end()) {
442
209k
      SkipToNextClause();
443
209k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPBindClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
1.00M
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
1.00M
          End(Clauses.end()) {
442
1.00M
      SkipToNextClause();
443
1.00M
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
224
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
224
          End(Clauses.end()) {
442
224
      SkipToNextClause();
443
224
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAtClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
336
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
336
          End(Clauses.end()) {
442
336
      SkipToNextClause();
443
336
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeverityClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
338
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
338
          End(Clauses.end()) {
442
338
      SkipToNextClause();
443
338
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMessageClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
338
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
338
          End(Clauses.end()) {
442
338
      SkipToNextClause();
443
338
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
46.7k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
46.7k
          End(Clauses.end()) {
442
46.7k
      SkipToNextClause();
443
46.7k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
27.1k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
27.1k
          End(Clauses.end()) {
442
27.1k
      SkipToNextClause();
443
27.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSizesClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
180
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
180
          End(Clauses.end()) {
442
180
      SkipToNextClause();
443
180
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFullClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
242
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
242
          End(Clauses.end()) {
442
242
      SkipToNextClause();
443
242
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPartialClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
236
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
236
          End(Clauses.end()) {
442
236
      SkipToNextClause();
443
236
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDetachClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
4.22k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
4.22k
          End(Clauses.end()) {
442
4.22k
      SkipToNextClause();
443
4.22k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
21.1k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
21.1k
          End(Clauses.end()) {
442
21.1k
      SkipToNextClause();
443
21.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAffinityClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
2.19k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
2.19k
          End(Clauses.end()) {
442
2.19k
      SkipToNextClause();
443
2.19k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUsesAllocatorsClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
42.7k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
42.7k
          End(Clauses.end()) {
442
42.7k
      SkipToNextClause();
443
42.7k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXAttributeClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
26.0k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
26.0k
          End(Clauses.end()) {
442
26.0k
      SkipToNextClause();
443
26.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
21.4k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
21.4k
          End(Clauses.end()) {
442
21.4k
      SkipToNextClause();
443
21.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
59.4k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
59.4k
          End(Clauses.end()) {
442
59.4k
      SkipToNextClause();
443
59.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
19.9k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
19.9k
          End(Clauses.end()) {
442
19.9k
      SkipToNextClause();
443
19.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
43.2k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
43.2k
          End(Clauses.end()) {
442
43.2k
      SkipToNextClause();
443
43.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
136k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
136k
          End(Clauses.end()) {
442
136k
      SkipToNextClause();
443
136k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXDynCGroupMemClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
17.9k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
17.9k
          End(Clauses.end()) {
442
17.9k
      SkipToNextClause();
443
17.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
21.7k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
21.7k
          End(Clauses.end()) {
442
21.7k
      SkipToNextClause();
443
21.7k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
19.1k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
19.1k
          End(Clauses.end()) {
442
19.1k
      SkipToNextClause();
443
19.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHasDeviceAddrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
19.1k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
19.1k
          End(Clauses.end()) {
442
19.1k
      SkipToNextClause();
443
19.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
43.7k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
43.7k
          End(Clauses.end()) {
442
43.7k
      SkipToNextClause();
443
43.7k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
28.1k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
28.1k
          End(Clauses.end()) {
442
28.1k
      SkipToNextClause();
443
28.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
144k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
144k
          End(Clauses.end()) {
442
144k
      SkipToNextClause();
443
144k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
157k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
157k
          End(Clauses.end()) {
442
157k
      SkipToNextClause();
443
157k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
241k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
241k
          End(Clauses.end()) {
442
241k
      SkipToNextClause();
443
241k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
141k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
141k
          End(Clauses.end()) {
442
141k
      SkipToNextClause();
443
141k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXBareClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
3.09k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
3.09k
          End(Clauses.end()) {
442
3.09k
      SkipToNextClause();
443
3.09k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
17.0k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
17.0k
          End(Clauses.end()) {
442
17.0k
      SkipToNextClause();
443
17.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
17.0k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
17.0k
          End(Clauses.end()) {
442
17.0k
      SkipToNextClause();
443
17.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
27.7k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
27.7k
          End(Clauses.end()) {
442
27.7k
      SkipToNextClause();
443
27.7k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
2.81k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
2.81k
          End(Clauses.end()) {
442
2.81k
      SkipToNextClause();
443
2.81k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
13.1k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
13.1k
          End(Clauses.end()) {
442
13.1k
      SkipToNextClause();
443
13.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
23.1k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
23.1k
          End(Clauses.end()) {
442
23.1k
      SkipToNextClause();
443
23.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
10.2k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
10.2k
          End(Clauses.end()) {
442
10.2k
      SkipToNextClause();
443
10.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
130
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
130
          End(Clauses.end()) {
442
130
      SkipToNextClause();
443
130
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFilterClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
88
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
88
          End(Clauses.end()) {
442
88
      SkipToNextClause();
443
88
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
1.01k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
1.01k
          End(Clauses.end()) {
442
1.01k
      SkipToNextClause();
443
1.01k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
1.01k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
1.01k
          End(Clauses.end()) {
442
1.01k
      SkipToNextClause();
443
1.01k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
564
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
564
          End(Clauses.end()) {
442
564
      SkipToNextClause();
443
564
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
60
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
60
          End(Clauses.end()) {
442
60
      SkipToNextClause();
443
60
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
160
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
160
          End(Clauses.end()) {
442
160
      SkipToNextClause();
443
160
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDepobjClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
28
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
28
          End(Clauses.end()) {
442
28
      SkipToNextClause();
443
28
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDestroyClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
36
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
36
          End(Clauses.end()) {
442
36
      SkipToNextClause();
443
36
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUpdateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
8
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
8
          End(Clauses.end()) {
442
8
      SkipToNextClause();
443
8
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInclusiveClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
96
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
96
          End(Clauses.end()) {
442
96
      SkipToNextClause();
443
96
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
9.20k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
9.20k
          End(Clauses.end()) {
442
9.20k
      SkipToNextClause();
443
9.20k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDoacrossClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
190
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
190
          End(Clauses.end()) {
442
190
      SkipToNextClause();
443
190
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
102
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
102
          End(Clauses.end()) {
442
102
      SkipToNextClause();
443
102
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
11.3k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
11.3k
          End(Clauses.end()) {
442
11.3k
      SkipToNextClause();
443
11.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
9.54k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
9.54k
          End(Clauses.end()) {
442
9.54k
      SkipToNextClause();
443
9.54k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
7.83k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
7.83k
          End(Clauses.end()) {
442
7.83k
      SkipToNextClause();
443
7.83k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
6.12k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
6.12k
          End(Clauses.end()) {
442
6.12k
      SkipToNextClause();
443
6.12k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
4.41k
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
4.41k
          End(Clauses.end()) {
442
4.41k
      SkipToNextClause();
443
4.41k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInitClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
36
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
36
          End(Clauses.end()) {
442
36
      SkipToNextClause();
443
36
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
16
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
16
          End(Clauses.end()) {
442
16
      SkipToNextClause();
443
16
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
184
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
184
          End(Clauses.end()) {
442
184
      SkipToNextClause();
443
184
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDeviceAddrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
184
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
184
          End(Clauses.end()) {
442
184
      SkipToNextClause();
443
184
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
454
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
454
          End(Clauses.end()) {
442
454
      SkipToNextClause();
443
454
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
454
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
454
          End(Clauses.end()) {
442
454
      SkipToNextClause();
443
454
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
440
418
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
441
418
          End(Clauses.end()) {
442
418
      SkipToNextClause();
443
418
    }
444
445
75.6k
    const SpecificClause *operator*() const {
446
75.6k
      return cast<SpecificClause>(*this->I);
447
75.6k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::operator*() const
Line
Count
Source
445
6.24k
    const SpecificClause *operator*() const {
446
6.24k
      return cast<SpecificClause>(*this->I);
447
6.24k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::operator*() const
Line
Count
Source
445
1.51k
    const SpecificClause *operator*() const {
446
1.51k
      return cast<SpecificClause>(*this->I);
447
1.51k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPBindClause>::operator*() const
Line
Count
Source
445
194
    const SpecificClause *operator*() const {
446
194
      return cast<SpecificClause>(*this->I);
447
194
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::operator*() const
Line
Count
Source
445
12
    const SpecificClause *operator*() const {
446
12
      return cast<SpecificClause>(*this->I);
447
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAtClause>::operator*() const
Line
Count
Source
445
86
    const SpecificClause *operator*() const {
446
86
      return cast<SpecificClause>(*this->I);
447
86
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeverityClause>::operator*() const
Line
Count
Source
445
89
    const SpecificClause *operator*() const {
446
89
      return cast<SpecificClause>(*this->I);
447
89
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMessageClause>::operator*() const
Line
Count
Source
445
71
    const SpecificClause *operator*() const {
446
71
      return cast<SpecificClause>(*this->I);
447
71
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::operator*() const
Line
Count
Source
445
64
    const SpecificClause *operator*() const {
446
64
      return cast<SpecificClause>(*this->I);
447
64
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSizesClause>::operator*() const
Line
Count
Source
445
79
    const SpecificClause *operator*() const {
446
79
      return cast<SpecificClause>(*this->I);
447
79
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFullClause>::operator*() const
Line
Count
Source
445
13
    const SpecificClause *operator*() const {
446
13
      return cast<SpecificClause>(*this->I);
447
13
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPartialClause>::operator*() const
Line
Count
Source
445
77
    const SpecificClause *operator*() const {
446
77
      return cast<SpecificClause>(*this->I);
447
77
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::operator*() const
Line
Count
Source
445
484
    const SpecificClause *operator*() const {
446
484
      return cast<SpecificClause>(*this->I);
447
484
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDetachClause>::operator*() const
Line
Count
Source
445
2
    const SpecificClause *operator*() const {
446
2
      return cast<SpecificClause>(*this->I);
447
2
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAffinityClause>::operator*() const
Line
Count
Source
445
48
    const SpecificClause *operator*() const {
446
48
      return cast<SpecificClause>(*this->I);
447
48
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUsesAllocatorsClause>::operator*() const
Line
Count
Source
445
118
    const SpecificClause *operator*() const {
446
118
      return cast<SpecificClause>(*this->I);
447
118
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXAttributeClause>::operator*() const
Line
Count
Source
445
34
    const SpecificClause *operator*() const {
446
34
      return cast<SpecificClause>(*this->I);
447
34
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::operator*() const
Line
Count
Source
445
794
    const SpecificClause *operator*() const {
446
794
      return cast<SpecificClause>(*this->I);
447
794
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::operator*() const
Line
Count
Source
445
5.19k
    const SpecificClause *operator*() const {
446
5.19k
      return cast<SpecificClause>(*this->I);
447
5.19k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::operator*() const
Line
Count
Source
445
495
    const SpecificClause *operator*() const {
446
495
      return cast<SpecificClause>(*this->I);
447
495
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::operator*() const
Line
Count
Source
445
684
    const SpecificClause *operator*() const {
446
684
      return cast<SpecificClause>(*this->I);
447
684
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::operator*() const
Line
Count
Source
445
24.0k
    const SpecificClause *operator*() const {
446
24.0k
      return cast<SpecificClause>(*this->I);
447
24.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXDynCGroupMemClause>::operator*() const
Line
Count
Source
445
72
    const SpecificClause *operator*() const {
446
72
      return cast<SpecificClause>(*this->I);
447
72
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::operator*() const
Line
Count
Source
445
104
    const SpecificClause *operator*() const {
446
104
      return cast<SpecificClause>(*this->I);
447
104
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHasDeviceAddrClause>::operator*() const
Line
Count
Source
445
18
    const SpecificClause *operator*() const {
446
18
      return cast<SpecificClause>(*this->I);
447
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::operator*() const
Line
Count
Source
445
12.4k
    const SpecificClause *operator*() const {
446
12.4k
      return cast<SpecificClause>(*this->I);
447
12.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::operator*() const
Line
Count
Source
445
138
    const SpecificClause *operator*() const {
446
138
      return cast<SpecificClause>(*this->I);
447
138
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::operator*() const
Line
Count
Source
445
2.69k
    const SpecificClause *operator*() const {
446
2.69k
      return cast<SpecificClause>(*this->I);
447
2.69k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::operator*() const
Line
Count
Source
445
2.90k
    const SpecificClause *operator*() const {
446
2.90k
      return cast<SpecificClause>(*this->I);
447
2.90k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::operator*() const
Line
Count
Source
445
6.13k
    const SpecificClause *operator*() const {
446
6.13k
      return cast<SpecificClause>(*this->I);
447
6.13k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::operator*() const
Line
Count
Source
445
2.48k
    const SpecificClause *operator*() const {
446
2.48k
      return cast<SpecificClause>(*this->I);
447
2.48k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXBareClause>::operator*() const
Line
Count
Source
445
3
    const SpecificClause *operator*() const {
446
3
      return cast<SpecificClause>(*this->I);
447
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::operator*() const
Line
Count
Source
445
250
    const SpecificClause *operator*() const {
446
250
      return cast<SpecificClause>(*this->I);
447
250
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::operator*() const
Line
Count
Source
445
229
    const SpecificClause *operator*() const {
446
229
      return cast<SpecificClause>(*this->I);
447
229
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::operator*() const
Line
Count
Source
445
317
    const SpecificClause *operator*() const {
446
317
      return cast<SpecificClause>(*this->I);
447
317
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::operator*() const
Line
Count
Source
445
32
    const SpecificClause *operator*() const {
446
32
      return cast<SpecificClause>(*this->I);
447
32
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::operator*() const
Line
Count
Source
445
87
    const SpecificClause *operator*() const {
446
87
      return cast<SpecificClause>(*this->I);
447
87
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::operator*() const
Line
Count
Source
445
11
    const SpecificClause *operator*() const {
446
11
      return cast<SpecificClause>(*this->I);
447
11
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::operator*() const
Line
Count
Source
445
980
    const SpecificClause *operator*() const {
446
980
      return cast<SpecificClause>(*this->I);
447
980
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::operator*() const
Line
Count
Source
445
28
    const SpecificClause *operator*() const {
446
28
      return cast<SpecificClause>(*this->I);
447
28
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFilterClause>::operator*() const
Line
Count
Source
445
32
    const SpecificClause *operator*() const {
446
32
      return cast<SpecificClause>(*this->I);
447
32
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::operator*() const
Line
Count
Source
445
1.14k
    const SpecificClause *operator*() const {
446
1.14k
      return cast<SpecificClause>(*this->I);
447
1.14k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::operator*() const
Line
Count
Source
445
41
    const SpecificClause *operator*() const {
446
41
      return cast<SpecificClause>(*this->I);
447
41
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::operator*() const
Line
Count
Source
445
26
    const SpecificClause *operator*() const {
446
26
      return cast<SpecificClause>(*this->I);
447
26
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::operator*() const
Line
Count
Source
445
48
    const SpecificClause *operator*() const {
446
48
      return cast<SpecificClause>(*this->I);
447
48
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::operator*() const
Line
Count
Source
445
34
    const SpecificClause *operator*() const {
446
34
      return cast<SpecificClause>(*this->I);
447
34
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::operator*() const
Line
Count
Source
445
30
    const SpecificClause *operator*() const {
446
30
      return cast<SpecificClause>(*this->I);
447
30
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::operator*() const
Line
Count
Source
445
16
    const SpecificClause *operator*() const {
446
16
      return cast<SpecificClause>(*this->I);
447
16
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDepobjClause>::operator*() const
Line
Count
Source
445
14
    const SpecificClause *operator*() const {
446
14
      return cast<SpecificClause>(*this->I);
447
14
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDestroyClause>::operator*() const
Line
Count
Source
445
6
    const SpecificClause *operator*() const {
446
6
      return cast<SpecificClause>(*this->I);
447
6
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUpdateClause>::operator*() const
Line
Count
Source
445
4
    const SpecificClause *operator*() const {
446
4
      return cast<SpecificClause>(*this->I);
447
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::operator*() const
Line
Count
Source
445
447
    const SpecificClause *operator*() const {
446
447
      return cast<SpecificClause>(*this->I);
447
447
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDoacrossClause>::operator*() const
Line
Count
Source
445
12
    const SpecificClause *operator*() const {
446
12
      return cast<SpecificClause>(*this->I);
447
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::operator*() const
Line
Count
Source
445
17
    const SpecificClause *operator*() const {
446
17
      return cast<SpecificClause>(*this->I);
447
17
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::operator*() const
Line
Count
Source
445
888
    const SpecificClause *operator*() const {
446
888
      return cast<SpecificClause>(*this->I);
447
888
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::operator*() const
Line
Count
Source
445
852
    const SpecificClause *operator*() const {
446
852
      return cast<SpecificClause>(*this->I);
447
852
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::operator*() const
Line
Count
Source
445
854
    const SpecificClause *operator*() const {
446
854
      return cast<SpecificClause>(*this->I);
447
854
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::operator*() const
Line
Count
Source
445
856
    const SpecificClause *operator*() const {
446
856
      return cast<SpecificClause>(*this->I);
447
856
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::operator*() const
Line
Count
Source
445
870
    const SpecificClause *operator*() const {
446
870
      return cast<SpecificClause>(*this->I);
447
870
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInitClause>::operator*() const
Line
Count
Source
445
8
    const SpecificClause *operator*() const {
446
8
      return cast<SpecificClause>(*this->I);
447
8
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseClause>::operator*() const
Line
Count
Source
445
8
    const SpecificClause *operator*() const {
446
8
      return cast<SpecificClause>(*this->I);
447
8
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::operator*() const
Line
Count
Source
445
86
    const SpecificClause *operator*() const {
446
86
      return cast<SpecificClause>(*this->I);
447
86
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDeviceAddrClause>::operator*() const
Line
Count
Source
445
9
    const SpecificClause *operator*() const {
446
9
      return cast<SpecificClause>(*this->I);
447
9
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::operator*() const
Line
Count
Source
445
18
    const SpecificClause *operator*() const {
446
18
      return cast<SpecificClause>(*this->I);
447
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::operator*() const
Line
Count
Source
445
18
    const SpecificClause *operator*() const {
446
18
      return cast<SpecificClause>(*this->I);
447
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::operator*() const
Line
Count
Source
445
37
    const SpecificClause *operator*() const {
446
37
      return cast<SpecificClause>(*this->I);
447
37
    }
448
    const SpecificClause *operator->() const { return **this; }
449
450
65.2k
    specific_clause_iterator &operator++() {
451
65.2k
      ++this->I;
452
65.2k
      SkipToNextClause();
453
65.2k
      return *this;
454
65.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPBindClause>::operator++()
Line
Count
Source
450
194
    specific_clause_iterator &operator++() {
451
194
      ++this->I;
452
194
      SkipToNextClause();
453
194
      return *this;
454
194
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::operator++()
Line
Count
Source
450
12
    specific_clause_iterator &operator++() {
451
12
      ++this->I;
452
12
      SkipToNextClause();
453
12
      return *this;
454
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAtClause>::operator++()
Line
Count
Source
450
86
    specific_clause_iterator &operator++() {
451
86
      ++this->I;
452
86
      SkipToNextClause();
453
86
      return *this;
454
86
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeverityClause>::operator++()
Line
Count
Source
450
89
    specific_clause_iterator &operator++() {
451
89
      ++this->I;
452
89
      SkipToNextClause();
453
89
      return *this;
454
89
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMessageClause>::operator++()
Line
Count
Source
450
71
    specific_clause_iterator &operator++() {
451
71
      ++this->I;
452
71
      SkipToNextClause();
453
71
      return *this;
454
71
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::operator++()
Line
Count
Source
450
64
    specific_clause_iterator &operator++() {
451
64
      ++this->I;
452
64
      SkipToNextClause();
453
64
      return *this;
454
64
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFullClause>::operator++()
Line
Count
Source
450
13
    specific_clause_iterator &operator++() {
451
13
      ++this->I;
452
13
      SkipToNextClause();
453
13
      return *this;
454
13
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPartialClause>::operator++()
Line
Count
Source
450
77
    specific_clause_iterator &operator++() {
451
77
      ++this->I;
452
77
      SkipToNextClause();
453
77
      return *this;
454
77
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::operator++()
Line
Count
Source
450
252
    specific_clause_iterator &operator++() {
451
252
      ++this->I;
452
252
      SkipToNextClause();
453
252
      return *this;
454
252
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::operator++()
Line
Count
Source
450
484
    specific_clause_iterator &operator++() {
451
484
      ++this->I;
452
484
      SkipToNextClause();
453
484
      return *this;
454
484
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDetachClause>::operator++()
Line
Count
Source
450
2
    specific_clause_iterator &operator++() {
451
2
      ++this->I;
452
2
      SkipToNextClause();
453
2
      return *this;
454
2
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAffinityClause>::operator++()
Line
Count
Source
450
48
    specific_clause_iterator &operator++() {
451
48
      ++this->I;
452
48
      SkipToNextClause();
453
48
      return *this;
454
48
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUsesAllocatorsClause>::operator++()
Line
Count
Source
450
118
    specific_clause_iterator &operator++() {
451
118
      ++this->I;
452
118
      SkipToNextClause();
453
118
      return *this;
454
118
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXAttributeClause>::operator++()
Line
Count
Source
450
34
    specific_clause_iterator &operator++() {
451
34
      ++this->I;
452
34
      SkipToNextClause();
453
34
      return *this;
454
34
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::operator++()
Line
Count
Source
450
794
    specific_clause_iterator &operator++() {
451
794
      ++this->I;
452
794
      SkipToNextClause();
453
794
      return *this;
454
794
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::operator++()
Line
Count
Source
450
2.45k
    specific_clause_iterator &operator++() {
451
2.45k
      ++this->I;
452
2.45k
      SkipToNextClause();
453
2.45k
      return *this;
454
2.45k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::operator++()
Line
Count
Source
450
495
    specific_clause_iterator &operator++() {
451
495
      ++this->I;
452
495
      SkipToNextClause();
453
495
      return *this;
454
495
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::operator++()
Line
Count
Source
450
684
    specific_clause_iterator &operator++() {
451
684
      ++this->I;
452
684
      SkipToNextClause();
453
684
      return *this;
454
684
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::operator++()
Line
Count
Source
450
24.0k
    specific_clause_iterator &operator++() {
451
24.0k
      ++this->I;
452
24.0k
      SkipToNextClause();
453
24.0k
      return *this;
454
24.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXDynCGroupMemClause>::operator++()
Line
Count
Source
450
72
    specific_clause_iterator &operator++() {
451
72
      ++this->I;
452
72
      SkipToNextClause();
453
72
      return *this;
454
72
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::operator++()
Line
Count
Source
450
104
    specific_clause_iterator &operator++() {
451
104
      ++this->I;
452
104
      SkipToNextClause();
453
104
      return *this;
454
104
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHasDeviceAddrClause>::operator++()
Line
Count
Source
450
18
    specific_clause_iterator &operator++() {
451
18
      ++this->I;
452
18
      SkipToNextClause();
453
18
      return *this;
454
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::operator++()
Line
Count
Source
450
12.4k
    specific_clause_iterator &operator++() {
451
12.4k
      ++this->I;
452
12.4k
      SkipToNextClause();
453
12.4k
      return *this;
454
12.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::operator++()
Line
Count
Source
450
138
    specific_clause_iterator &operator++() {
451
138
      ++this->I;
452
138
      SkipToNextClause();
453
138
      return *this;
454
138
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::operator++()
Line
Count
Source
450
2.69k
    specific_clause_iterator &operator++() {
451
2.69k
      ++this->I;
452
2.69k
      SkipToNextClause();
453
2.69k
      return *this;
454
2.69k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::operator++()
Line
Count
Source
450
2.84k
    specific_clause_iterator &operator++() {
451
2.84k
      ++this->I;
452
2.84k
      SkipToNextClause();
453
2.84k
      return *this;
454
2.84k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::operator++()
Line
Count
Source
450
6.09k
    specific_clause_iterator &operator++() {
451
6.09k
      ++this->I;
452
6.09k
      SkipToNextClause();
453
6.09k
      return *this;
454
6.09k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::operator++()
Line
Count
Source
450
2.48k
    specific_clause_iterator &operator++() {
451
2.48k
      ++this->I;
452
2.48k
      SkipToNextClause();
453
2.48k
      return *this;
454
2.48k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXBareClause>::operator++()
Line
Count
Source
450
3
    specific_clause_iterator &operator++() {
451
3
      ++this->I;
452
3
      SkipToNextClause();
453
3
      return *this;
454
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::operator++()
Line
Count
Source
450
250
    specific_clause_iterator &operator++() {
451
250
      ++this->I;
452
250
      SkipToNextClause();
453
250
      return *this;
454
250
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::operator++()
Line
Count
Source
450
229
    specific_clause_iterator &operator++() {
451
229
      ++this->I;
452
229
      SkipToNextClause();
453
229
      return *this;
454
229
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::operator++()
Line
Count
Source
450
317
    specific_clause_iterator &operator++() {
451
317
      ++this->I;
452
317
      SkipToNextClause();
453
317
      return *this;
454
317
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::operator++()
Line
Count
Source
450
32
    specific_clause_iterator &operator++() {
451
32
      ++this->I;
452
32
      SkipToNextClause();
453
32
      return *this;
454
32
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::operator++()
Line
Count
Source
450
87
    specific_clause_iterator &operator++() {
451
87
      ++this->I;
452
87
      SkipToNextClause();
453
87
      return *this;
454
87
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::operator++()
Line
Count
Source
450
11
    specific_clause_iterator &operator++() {
451
11
      ++this->I;
452
11
      SkipToNextClause();
453
11
      return *this;
454
11
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::operator++()
Line
Count
Source
450
980
    specific_clause_iterator &operator++() {
451
980
      ++this->I;
452
980
      SkipToNextClause();
453
980
      return *this;
454
980
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::operator++()
Line
Count
Source
450
28
    specific_clause_iterator &operator++() {
451
28
      ++this->I;
452
28
      SkipToNextClause();
453
28
      return *this;
454
28
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFilterClause>::operator++()
Line
Count
Source
450
32
    specific_clause_iterator &operator++() {
451
32
      ++this->I;
452
32
      SkipToNextClause();
453
32
      return *this;
454
32
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::operator++()
Line
Count
Source
450
1.12k
    specific_clause_iterator &operator++() {
451
1.12k
      ++this->I;
452
1.12k
      SkipToNextClause();
453
1.12k
      return *this;
454
1.12k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::operator++()
Line
Count
Source
450
41
    specific_clause_iterator &operator++() {
451
41
      ++this->I;
452
41
      SkipToNextClause();
453
41
      return *this;
454
41
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::operator++()
Line
Count
Source
450
26
    specific_clause_iterator &operator++() {
451
26
      ++this->I;
452
26
      SkipToNextClause();
453
26
      return *this;
454
26
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::operator++()
Line
Count
Source
450
48
    specific_clause_iterator &operator++() {
451
48
      ++this->I;
452
48
      SkipToNextClause();
453
48
      return *this;
454
48
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::operator++()
Line
Count
Source
450
34
    specific_clause_iterator &operator++() {
451
34
      ++this->I;
452
34
      SkipToNextClause();
453
34
      return *this;
454
34
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::operator++()
Line
Count
Source
450
30
    specific_clause_iterator &operator++() {
451
30
      ++this->I;
452
30
      SkipToNextClause();
453
30
      return *this;
454
30
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::operator++()
Line
Count
Source
450
16
    specific_clause_iterator &operator++() {
451
16
      ++this->I;
452
16
      SkipToNextClause();
453
16
      return *this;
454
16
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDepobjClause>::operator++()
Line
Count
Source
450
14
    specific_clause_iterator &operator++() {
451
14
      ++this->I;
452
14
      SkipToNextClause();
453
14
      return *this;
454
14
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDestroyClause>::operator++()
Line
Count
Source
450
6
    specific_clause_iterator &operator++() {
451
6
      ++this->I;
452
6
      SkipToNextClause();
453
6
      return *this;
454
6
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUpdateClause>::operator++()
Line
Count
Source
450
4
    specific_clause_iterator &operator++() {
451
4
      ++this->I;
452
4
      SkipToNextClause();
453
4
      return *this;
454
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::operator++()
Line
Count
Source
450
447
    specific_clause_iterator &operator++() {
451
447
      ++this->I;
452
447
      SkipToNextClause();
453
447
      return *this;
454
447
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDoacrossClause>::operator++()
Line
Count
Source
450
12
    specific_clause_iterator &operator++() {
451
12
      ++this->I;
452
12
      SkipToNextClause();
453
12
      return *this;
454
12
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::operator++()
Line
Count
Source
450
17
    specific_clause_iterator &operator++() {
451
17
      ++this->I;
452
17
      SkipToNextClause();
453
17
      return *this;
454
17
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::operator++()
Line
Count
Source
450
888
    specific_clause_iterator &operator++() {
451
888
      ++this->I;
452
888
      SkipToNextClause();
453
888
      return *this;
454
888
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::operator++()
Line
Count
Source
450
852
    specific_clause_iterator &operator++() {
451
852
      ++this->I;
452
852
      SkipToNextClause();
453
852
      return *this;
454
852
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::operator++()
Line
Count
Source
450
854
    specific_clause_iterator &operator++() {
451
854
      ++this->I;
452
854
      SkipToNextClause();
453
854
      return *this;
454
854
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::operator++()
Line
Count
Source
450
856
    specific_clause_iterator &operator++() {
451
856
      ++this->I;
452
856
      SkipToNextClause();
453
856
      return *this;
454
856
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::operator++()
Line
Count
Source
450
870
    specific_clause_iterator &operator++() {
451
870
      ++this->I;
452
870
      SkipToNextClause();
453
870
      return *this;
454
870
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInitClause>::operator++()
Line
Count
Source
450
8
    specific_clause_iterator &operator++() {
451
8
      ++this->I;
452
8
      SkipToNextClause();
453
8
      return *this;
454
8
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseClause>::operator++()
Line
Count
Source
450
8
    specific_clause_iterator &operator++() {
451
8
      ++this->I;
452
8
      SkipToNextClause();
453
8
      return *this;
454
8
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::operator++()
Line
Count
Source
450
86
    specific_clause_iterator &operator++() {
451
86
      ++this->I;
452
86
      SkipToNextClause();
453
86
      return *this;
454
86
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDeviceAddrClause>::operator++()
Line
Count
Source
450
9
    specific_clause_iterator &operator++() {
451
9
      ++this->I;
452
9
      SkipToNextClause();
453
9
      return *this;
454
9
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::operator++()
Line
Count
Source
450
18
    specific_clause_iterator &operator++() {
451
18
      ++this->I;
452
18
      SkipToNextClause();
453
18
      return *this;
454
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::operator++()
Line
Count
Source
450
18
    specific_clause_iterator &operator++() {
451
18
      ++this->I;
452
18
      SkipToNextClause();
453
18
      return *this;
454
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::operator++()
Line
Count
Source
450
37
    specific_clause_iterator &operator++() {
451
37
      ++this->I;
452
37
      SkipToNextClause();
453
37
      return *this;
454
37
    }
455
  };
456
457
  template <typename SpecificClause>
458
  static llvm::iterator_range<specific_clause_iterator<SpecificClause>>
459
1.56M
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
1.56M
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
1.56M
            specific_clause_iterator<SpecificClause>(
462
1.56M
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
1.56M
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCollapseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
230k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
230k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
230k
            specific_clause_iterator<SpecificClause>(
462
230k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
230k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
104k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
104k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
104k
            specific_clause_iterator<SpecificClause>(
462
104k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
104k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPBindClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPBindClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
502k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
502k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
502k
            specific_clause_iterator<SpecificClause>(
462
502k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
502k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPHintClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
112
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
112
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
112
            specific_clause_iterator<SpecificClause>(
462
112
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
112
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAtClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAtClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
168
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
168
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
168
            specific_clause_iterator<SpecificClause>(
462
168
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
168
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeverityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSeverityClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
169
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
169
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
169
            specific_clause_iterator<SpecificClause>(
462
169
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
169
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMessageClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPMessageClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
169
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
169
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
169
            specific_clause_iterator<SpecificClause>(
462
169
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
169
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNowaitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
23.3k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
23.3k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
23.3k
            specific_clause_iterator<SpecificClause>(
462
23.3k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
23.3k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDependClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
13.5k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
13.5k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
13.5k
            specific_clause_iterator<SpecificClause>(
462
13.5k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
13.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSizesClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSizesClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
90
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
90
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
90
            specific_clause_iterator<SpecificClause>(
462
90
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
90
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFullClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFullClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
121
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
121
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
121
            specific_clause_iterator<SpecificClause>(
462
121
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
121
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPartialClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPartialClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
118
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
118
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
118
            specific_clause_iterator<SpecificClause>(
462
118
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
118
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDetachClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDetachClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
2.11k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
2.11k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
2.11k
            specific_clause_iterator<SpecificClause>(
462
2.11k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
2.11k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDeviceClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
10.5k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
10.5k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
10.5k
            specific_clause_iterator<SpecificClause>(
462
10.5k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
10.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAffinityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAffinityClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
1.09k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
1.09k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
1.09k
            specific_clause_iterator<SpecificClause>(
462
1.09k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
1.09k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUsesAllocatorsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUsesAllocatorsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
21.3k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
21.3k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
21.3k
            specific_clause_iterator<SpecificClause>(
462
21.3k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
21.3k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXAttributeClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPXAttributeClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
13.0k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
13.0k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
13.0k
            specific_clause_iterator<SpecificClause>(
462
13.0k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
13.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTeamsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
10.7k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
10.7k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
10.7k
            specific_clause_iterator<SpecificClause>(
462
10.7k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
10.7k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIfClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
29.7k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
29.7k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
29.7k
            specific_clause_iterator<SpecificClause>(
462
29.7k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
29.7k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumThreadsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
9.99k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
9.99k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
9.99k
            specific_clause_iterator<SpecificClause>(
462
9.99k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
9.99k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPThreadLimitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
21.6k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
21.6k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
21.6k
            specific_clause_iterator<SpecificClause>(
462
21.6k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
21.6k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFirstprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
68.1k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
68.1k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
68.1k
            specific_clause_iterator<SpecificClause>(
462
68.1k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
68.1k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXDynCGroupMemClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPXDynCGroupMemClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
8.98k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
8.98k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
8.98k
            specific_clause_iterator<SpecificClause>(
462
8.98k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
8.98k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
10.8k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
10.8k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
10.8k
            specific_clause_iterator<SpecificClause>(
462
10.8k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
10.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIsDevicePtrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
9.55k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
9.55k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
9.55k
            specific_clause_iterator<SpecificClause>(
462
9.55k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
9.55k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHasDeviceAddrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPHasDeviceAddrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
9.55k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
9.55k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
9.55k
            specific_clause_iterator<SpecificClause>(
462
9.55k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
9.55k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPMapClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
21.8k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
21.8k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
21.8k
            specific_clause_iterator<SpecificClause>(
462
21.8k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
21.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNontemporalClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
14.0k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
14.0k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
14.0k
            specific_clause_iterator<SpecificClause>(
462
14.0k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
14.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPrivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
72.4k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
72.4k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
72.4k
            specific_clause_iterator<SpecificClause>(
462
72.4k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
72.4k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLastprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
78.8k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
78.8k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
78.8k
            specific_clause_iterator<SpecificClause>(
462
78.8k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
78.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
120k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
120k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
120k
            specific_clause_iterator<SpecificClause>(
462
120k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
120k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLinearClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
70.8k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
70.8k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
70.8k
            specific_clause_iterator<SpecificClause>(
462
70.8k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
70.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXBareClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPXBareClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
1.54k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
1.54k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
1.54k
            specific_clause_iterator<SpecificClause>(
462
1.54k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
1.54k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSimdlenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
8.54k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
8.54k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
8.54k
            specific_clause_iterator<SpecificClause>(
462
8.54k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
8.54k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSafelenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
8.54k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
8.54k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
8.54k
            specific_clause_iterator<SpecificClause>(
462
8.54k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
8.54k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAlignedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
13.8k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
13.8k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
13.8k
            specific_clause_iterator<SpecificClause>(
462
13.8k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
13.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyinClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
1.40k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
1.40k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
1.40k
            specific_clause_iterator<SpecificClause>(
462
1.40k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
1.40k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPProcBindClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
6.55k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
6.55k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
6.55k
            specific_clause_iterator<SpecificClause>(
462
6.55k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
6.55k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
11.5k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
11.5k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
11.5k
            specific_clause_iterator<SpecificClause>(
462
11.5k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
11.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
5.13k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
5.13k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
5.13k
            specific_clause_iterator<SpecificClause>(
462
5.13k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
5.13k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
65
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
65
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
65
            specific_clause_iterator<SpecificClause>(
462
65
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
65
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFilterClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFilterClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
44
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
44
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
44
            specific_clause_iterator<SpecificClause>(
462
44
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
44
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFinalClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
509
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
509
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
509
            specific_clause_iterator<SpecificClause>(
462
509
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
509
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPriorityClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
509
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
509
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
509
            specific_clause_iterator<SpecificClause>(
462
509
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
509
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUntiedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
282
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
282
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
282
            specific_clause_iterator<SpecificClause>(
462
282
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
282
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPTaskReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
30
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
30
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
30
            specific_clause_iterator<SpecificClause>(
462
30
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
30
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFlushClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
80
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
80
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
80
            specific_clause_iterator<SpecificClause>(
462
80
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
80
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDepobjClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDepobjClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
14
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
14
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
14
            specific_clause_iterator<SpecificClause>(
462
14
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
14
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDestroyClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDestroyClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
18
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
18
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
18
            specific_clause_iterator<SpecificClause>(
462
18
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
18
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUpdateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUpdateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
4
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
4
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
4
            specific_clause_iterator<SpecificClause>(
462
4
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
4
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInclusiveClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInclusiveClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
48
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
48
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
48
            specific_clause_iterator<SpecificClause>(
462
48
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
48
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDistScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
4.60k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
4.60k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
4.60k
            specific_clause_iterator<SpecificClause>(
462
4.60k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
4.60k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDoacrossClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDoacrossClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
95
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
95
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
95
            specific_clause_iterator<SpecificClause>(
462
95
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
95
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSIMDClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
51
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
51
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
51
            specific_clause_iterator<SpecificClause>(
462
51
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
51
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSeqCstClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
5.65k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
5.65k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
5.65k
            specific_clause_iterator<SpecificClause>(
462
5.65k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
5.65k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAcqRelClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
4.77k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
4.77k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
4.77k
            specific_clause_iterator<SpecificClause>(
462
4.77k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
4.77k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAcquireClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
3.91k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
3.91k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
3.91k
            specific_clause_iterator<SpecificClause>(
462
3.91k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
3.91k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReleaseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
3.06k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
3.06k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
3.06k
            specific_clause_iterator<SpecificClause>(
462
3.06k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
3.06k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPRelaxedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
2.20k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
2.20k
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
2.20k
            specific_clause_iterator<SpecificClause>(
462
2.20k
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
2.20k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
18
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
18
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
18
            specific_clause_iterator<SpecificClause>(
462
18
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
18
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
8
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
8
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
8
            specific_clause_iterator<SpecificClause>(
462
8
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
8
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDevicePtrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
92
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
92
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
92
            specific_clause_iterator<SpecificClause>(
462
92
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
92
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDeviceAddrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDeviceAddrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
92
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
92
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
92
            specific_clause_iterator<SpecificClause>(
462
92
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
92
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNogroupClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
227
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
227
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
227
            specific_clause_iterator<SpecificClause>(
462
227
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
227
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPGrainsizeClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
227
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
227
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
227
            specific_clause_iterator<SpecificClause>(
462
227
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
227
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTasksClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
459
209
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
460
209
    return {specific_clause_iterator<SpecificClause>(Clauses),
461
209
            specific_clause_iterator<SpecificClause>(
462
209
                llvm::ArrayRef(Clauses.end(), (size_t)0))};
463
209
  }
464
465
  template <typename SpecificClause>
466
  llvm::iterator_range<specific_clause_iterator<SpecificClause>>
467
631k
  getClausesOfKind() const {
468
631k
    return getClausesOfKind<SpecificClause>(clauses());
469
631k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDependClause>() const
Line
Count
Source
467
12.5k
  getClausesOfKind() const {
468
12.5k
    return getClausesOfKind<SpecificClause>(clauses());
469
12.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderedClause>() const
Line
Count
Source
467
24.0k
  getClausesOfKind() const {
468
24.0k
    return getClausesOfKind<SpecificClause>(clauses());
469
24.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDetachClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDetachClause>() const
Line
Count
Source
467
1.05k
  getClausesOfKind() const {
468
1.05k
    return getClausesOfKind<SpecificClause>(clauses());
469
1.05k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNowaitClause>() const
Line
Count
Source
467
20.7k
  getClausesOfKind() const {
468
20.7k
    return getClausesOfKind<SpecificClause>(clauses());
469
20.7k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAffinityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAffinityClause>() const
Line
Count
Source
467
1.09k
  getClausesOfKind() const {
468
1.09k
    return getClausesOfKind<SpecificClause>(clauses());
469
1.09k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUsesAllocatorsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUsesAllocatorsClause>() const
Line
Count
Source
467
21.3k
  getClausesOfKind() const {
468
21.3k
    return getClausesOfKind<SpecificClause>(clauses());
469
21.3k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPXAttributeClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPXAttributeClause>() const
Line
Count
Source
467
13.0k
  getClausesOfKind() const {
468
13.0k
    return getClausesOfKind<SpecificClause>(clauses());
469
13.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTeamsClause>() const
Line
Count
Source
467
4.54k
  getClausesOfKind() const {
468
4.54k
    return getClausesOfKind<SpecificClause>(clauses());
469
4.54k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIfClause>() const
Line
Count
Source
467
29.0k
  getClausesOfKind() const {
468
29.0k
    return getClausesOfKind<SpecificClause>(clauses());
469
29.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumThreadsClause>() const
Line
Count
Source
467
3.28k
  getClausesOfKind() const {
468
3.28k
    return getClausesOfKind<SpecificClause>(clauses());
469
3.28k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPThreadLimitClause>() const
Line
Count
Source
467
7.73k
  getClausesOfKind() const {
468
7.73k
    return getClausesOfKind<SpecificClause>(clauses());
469
7.73k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFirstprivateClause>() const
Line
Count
Source
467
68.1k
  getClausesOfKind() const {
468
68.1k
    return getClausesOfKind<SpecificClause>(clauses());
469
68.1k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInReductionClause>() const
Line
Count
Source
467
10.8k
  getClausesOfKind() const {
468
10.8k
    return getClausesOfKind<SpecificClause>(clauses());
469
10.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIsDevicePtrClause>() const
Line
Count
Source
467
9.55k
  getClausesOfKind() const {
468
9.55k
    return getClausesOfKind<SpecificClause>(clauses());
469
9.55k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHasDeviceAddrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPHasDeviceAddrClause>() const
Line
Count
Source
467
9.55k
  getClausesOfKind() const {
468
9.55k
    return getClausesOfKind<SpecificClause>(clauses());
469
9.55k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPMapClause>() const
Line
Count
Source
467
21.8k
  getClausesOfKind() const {
468
21.8k
    return getClausesOfKind<SpecificClause>(clauses());
469
21.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNontemporalClause>() const
Line
Count
Source
467
14.0k
  getClausesOfKind() const {
468
14.0k
    return getClausesOfKind<SpecificClause>(clauses());
469
14.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPrivateClause>() const
Line
Count
Source
467
72.4k
  getClausesOfKind() const {
468
72.4k
    return getClausesOfKind<SpecificClause>(clauses());
469
72.4k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLastprivateClause>() const
Line
Count
Source
467
78.8k
  getClausesOfKind() const {
468
78.8k
    return getClausesOfKind<SpecificClause>(clauses());
469
78.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReductionClause>() const
Line
Count
Source
467
120k
  getClausesOfKind() const {
468
120k
    return getClausesOfKind<SpecificClause>(clauses());
469
120k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLinearClause>() const
Line
Count
Source
467
70.8k
  getClausesOfKind() const {
468
70.8k
    return getClausesOfKind<SpecificClause>(clauses());
469
70.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAlignedClause>() const
Line
Count
Source
467
13.8k
  getClausesOfKind() const {
468
13.8k
    return getClausesOfKind<SpecificClause>(clauses());
469
13.8k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyinClause>() const
Line
Count
Source
467
1.40k
  getClausesOfKind() const {
468
1.40k
    return getClausesOfKind<SpecificClause>(clauses());
469
1.40k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFullClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFullClause>() const
Line
Count
Source
467
18
  getClausesOfKind() const {
468
18
    return getClausesOfKind<SpecificClause>(clauses());
469
18
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyprivateClause>() const
Line
Count
Source
467
65
  getClausesOfKind() const {
468
65
    return getClausesOfKind<SpecificClause>(clauses());
469
65
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPTaskReductionClause>() const
Line
Count
Source
467
30
  getClausesOfKind() const {
468
30
    return getClausesOfKind<SpecificClause>(clauses());
469
30
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInclusiveClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInclusiveClause>() const
Line
Count
Source
467
48
  getClausesOfKind() const {
468
48
    return getClausesOfKind<SpecificClause>(clauses());
469
48
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDoacrossClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDoacrossClause>() const
Line
Count
Source
467
95
  getClausesOfKind() const {
468
95
    return getClausesOfKind<SpecificClause>(clauses());
469
95
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDevicePtrClause>() const
Line
Count
Source
467
92
  getClausesOfKind() const {
468
92
    return getClausesOfKind<SpecificClause>(clauses());
469
92
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDeviceAddrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDeviceAddrClause>() const
Line
Count
Source
467
92
  getClausesOfKind() const {
468
92
    return getClausesOfKind<SpecificClause>(clauses());
469
92
  }
470
471
  /// Gets a single clause of the specified kind associated with the
472
  /// current directive iff there is only one clause of this kind (and assertion
473
  /// is fired if there is more than one clause is associated with the
474
  /// directive). Returns nullptr if no clause of this kind is associated with
475
  /// the directive.
476
  template <typename SpecificClause>
477
627k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
627k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
627k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
9.97k
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
9.97k
             "There are at least 2 clauses of the specified kind");
483
9.97k
      return *ClausesOfKind.begin();
484
9.97k
    }
485
617k
    return nullptr;
486
627k
  }
clang::OMPBindClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPBindClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
502k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
502k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
502k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
194
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
194
             "There are at least 2 clauses of the specified kind");
483
194
      return *ClausesOfKind.begin();
484
194
    }
485
501k
    return nullptr;
486
502k
  }
clang::OMPHintClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPHintClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
112
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
112
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
112
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
12
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
12
             "There are at least 2 clauses of the specified kind");
483
12
      return *ClausesOfKind.begin();
484
12
    }
485
100
    return nullptr;
486
112
  }
clang::OMPAtClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPAtClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
168
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
168
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
168
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
86
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
86
             "There are at least 2 clauses of the specified kind");
483
86
      return *ClausesOfKind.begin();
484
86
    }
485
82
    return nullptr;
486
168
  }
clang::OMPSeverityClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSeverityClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
169
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
169
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
169
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
89
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
89
             "There are at least 2 clauses of the specified kind");
483
89
      return *ClausesOfKind.begin();
484
89
    }
485
80
    return nullptr;
486
169
  }
clang::OMPMessageClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPMessageClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
169
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
169
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
169
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
71
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
71
             "There are at least 2 clauses of the specified kind");
483
71
      return *ClausesOfKind.begin();
484
71
    }
485
98
    return nullptr;
486
169
  }
clang::OMPNowaitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNowaitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
2.59k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
2.59k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
2.59k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
64
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
64
             "There are at least 2 clauses of the specified kind");
483
64
      return *ClausesOfKind.begin();
484
64
    }
485
2.53k
    return nullptr;
486
2.59k
  }
clang::OMPFullClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFullClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
103
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
103
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
103
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
13
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
13
             "There are at least 2 clauses of the specified kind");
483
13
      return *ClausesOfKind.begin();
484
13
    }
485
90
    return nullptr;
486
103
  }
clang::OMPPartialClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPPartialClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
118
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
118
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
118
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
77
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
77
             "There are at least 2 clauses of the specified kind");
483
77
      return *ClausesOfKind.begin();
484
77
    }
485
41
    return nullptr;
486
118
  }
clang::OMPDeviceClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDeviceClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
10.5k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
10.5k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
10.5k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
484
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
484
             "There are at least 2 clauses of the specified kind");
483
484
      return *ClausesOfKind.begin();
484
484
    }
485
10.0k
    return nullptr;
486
10.5k
  }
clang::OMPDetachClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDetachClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
1.05k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
1.05k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
1.05k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
2
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
2
             "There are at least 2 clauses of the specified kind");
483
2
      return *ClausesOfKind.begin();
484
2
    }
485
1.05k
    return nullptr;
486
1.05k
  }
clang::OMPNumTeamsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTeamsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
6.18k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
6.18k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
6.18k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
794
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
794
             "There are at least 2 clauses of the specified kind");
483
794
      return *ClausesOfKind.begin();
484
794
    }
485
5.39k
    return nullptr;
486
6.18k
  }
clang::OMPNumThreadsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumThreadsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
6.71k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
6.71k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
6.71k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
495
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
495
             "There are at least 2 clauses of the specified kind");
483
495
      return *ClausesOfKind.begin();
484
495
    }
485
6.21k
    return nullptr;
486
6.71k
  }
clang::OMPThreadLimitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPThreadLimitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
13.9k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
13.9k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
13.9k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
684
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
684
             "There are at least 2 clauses of the specified kind");
483
684
      return *ClausesOfKind.begin();
484
684
    }
485
13.2k
    return nullptr;
486
13.9k
  }
clang::OMPXDynCGroupMemClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPXDynCGroupMemClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
8.98k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
8.98k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
8.98k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
72
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
72
             "There are at least 2 clauses of the specified kind");
483
72
      return *ClausesOfKind.begin();
484
72
    }
485
8.91k
    return nullptr;
486
8.98k
  }
clang::OMPXBareClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPXBareClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
1.54k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
1.54k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
1.54k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
3
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
3
             "There are at least 2 clauses of the specified kind");
483
3
      return *ClausesOfKind.begin();
484
3
    }
485
1.54k
    return nullptr;
486
1.54k
  }
clang::OMPSimdlenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSimdlenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
8.54k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
8.54k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
8.54k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
250
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
250
             "There are at least 2 clauses of the specified kind");
483
250
      return *ClausesOfKind.begin();
484
250
    }
485
8.29k
    return nullptr;
486
8.54k
  }
clang::OMPSafelenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSafelenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
8.54k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
8.54k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
8.54k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
229
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
229
             "There are at least 2 clauses of the specified kind");
483
229
      return *ClausesOfKind.begin();
484
229
    }
485
8.31k
    return nullptr;
486
8.54k
  }
clang::OMPProcBindClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPProcBindClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
6.55k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
6.55k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
6.55k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
87
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
87
             "There are at least 2 clauses of the specified kind");
483
87
      return *ClausesOfKind.begin();
484
87
    }
485
6.47k
    return nullptr;
486
6.55k
  }
clang::OMPIfClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPIfClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
647
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
647
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
647
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
142
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
142
             "There are at least 2 clauses of the specified kind");
483
142
      return *ClausesOfKind.begin();
484
142
    }
485
505
    return nullptr;
486
647
  }
clang::OMPOrderClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPOrderClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
11.5k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
11.5k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
11.5k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
11
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
11
             "There are at least 2 clauses of the specified kind");
483
11
      return *ClausesOfKind.begin();
484
11
    }
485
11.5k
    return nullptr;
486
11.5k
  }
clang::OMPOrderedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPOrderedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
5.10k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
5.10k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
5.10k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
83
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
83
             "There are at least 2 clauses of the specified kind");
483
83
      return *ClausesOfKind.begin();
484
83
    }
485
5.01k
    return nullptr;
486
5.10k
  }
clang::OMPScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
5.13k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
5.13k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
5.13k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
980
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
980
             "There are at least 2 clauses of the specified kind");
483
980
      return *ClausesOfKind.begin();
484
980
    }
485
4.15k
    return nullptr;
486
5.13k
  }
clang::OMPFilterClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFilterClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
44
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
44
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
44
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
32
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
32
             "There are at least 2 clauses of the specified kind");
483
32
      return *ClausesOfKind.begin();
484
32
    }
485
12
    return nullptr;
486
44
  }
clang::OMPFinalClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFinalClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
509
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
509
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
509
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
41
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
41
             "There are at least 2 clauses of the specified kind");
483
41
      return *ClausesOfKind.begin();
484
41
    }
485
468
    return nullptr;
486
509
  }
clang::OMPPriorityClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPPriorityClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
509
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
509
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
509
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
26
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
26
             "There are at least 2 clauses of the specified kind");
483
26
      return *ClausesOfKind.begin();
484
26
    }
485
483
    return nullptr;
486
509
  }
clang::OMPUntiedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUntiedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
282
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
282
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
282
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
34
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
34
             "There are at least 2 clauses of the specified kind");
483
34
      return *ClausesOfKind.begin();
484
34
    }
485
248
    return nullptr;
486
282
  }
clang::OMPFlushClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFlushClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
80
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
80
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
80
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
16
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
16
             "There are at least 2 clauses of the specified kind");
483
16
      return *ClausesOfKind.begin();
484
16
    }
485
64
    return nullptr;
486
80
  }
clang::OMPDepobjClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDepobjClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
14
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
14
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
14
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
14
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
14
             "There are at least 2 clauses of the specified kind");
483
14
      return *ClausesOfKind.begin();
484
14
    }
485
0
    return nullptr;
486
14
  }
clang::OMPDependClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDependClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
14
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
14
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
14
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
6
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
6
             "There are at least 2 clauses of the specified kind");
483
6
      return *ClausesOfKind.begin();
484
6
    }
485
8
    return nullptr;
486
14
  }
clang::OMPDestroyClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDestroyClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
18
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
18
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
18
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
6
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
6
             "There are at least 2 clauses of the specified kind");
483
6
      return *ClausesOfKind.begin();
484
6
    }
485
12
    return nullptr;
486
18
  }
clang::OMPUpdateClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUpdateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
4
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
4
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
4
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
4
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
4
             "There are at least 2 clauses of the specified kind");
483
4
      return *ClausesOfKind.begin();
484
4
    }
485
0
    return nullptr;
486
4
  }
clang::OMPDistScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDistScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
4.60k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
4.60k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
4.60k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
447
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
447
             "There are at least 2 clauses of the specified kind");
483
447
      return *ClausesOfKind.begin();
484
447
    }
485
4.15k
    return nullptr;
486
4.60k
  }
clang::OMPSIMDClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSIMDClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
51
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
51
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
51
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
17
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
17
             "There are at least 2 clauses of the specified kind");
483
17
      return *ClausesOfKind.begin();
484
17
    }
485
34
    return nullptr;
486
51
  }
clang::OMPSeqCstClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSeqCstClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
5.65k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
5.65k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
5.65k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
888
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
888
             "There are at least 2 clauses of the specified kind");
483
888
      return *ClausesOfKind.begin();
484
888
    }
485
4.77k
    return nullptr;
486
5.65k
  }
clang::OMPAcqRelClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPAcqRelClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
4.77k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
4.77k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
4.77k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
852
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
852
             "There are at least 2 clauses of the specified kind");
483
852
      return *ClausesOfKind.begin();
484
852
    }
485
3.91k
    return nullptr;
486
4.77k
  }
clang::OMPAcquireClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPAcquireClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
3.91k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
3.91k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
3.91k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
854
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
854
             "There are at least 2 clauses of the specified kind");
483
854
      return *ClausesOfKind.begin();
484
854
    }
485
3.06k
    return nullptr;
486
3.91k
  }
clang::OMPReleaseClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPReleaseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
3.06k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
3.06k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
3.06k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
856
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
856
             "There are at least 2 clauses of the specified kind");
483
856
      return *ClausesOfKind.begin();
484
856
    }
485
2.20k
    return nullptr;
486
3.06k
  }
clang::OMPRelaxedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPRelaxedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
2.20k
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
2.20k
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
2.20k
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
870
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
870
             "There are at least 2 clauses of the specified kind");
483
870
      return *ClausesOfKind.begin();
484
870
    }
485
1.33k
    return nullptr;
486
2.20k
  }
clang::OMPInitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPInitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
18
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
18
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
18
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
8
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
8
             "There are at least 2 clauses of the specified kind");
483
8
      return *ClausesOfKind.begin();
484
8
    }
485
10
    return nullptr;
486
18
  }
clang::OMPUseClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
8
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
8
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
8
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
8
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
8
             "There are at least 2 clauses of the specified kind");
483
8
      return *ClausesOfKind.begin();
484
8
    }
485
0
    return nullptr;
486
8
  }
clang::OMPNogroupClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNogroupClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
227
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
227
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
227
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
18
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
18
             "There are at least 2 clauses of the specified kind");
483
18
      return *ClausesOfKind.begin();
484
18
    }
485
209
    return nullptr;
486
227
  }
clang::OMPGrainsizeClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPGrainsizeClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
227
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
227
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
227
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
18
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
18
             "There are at least 2 clauses of the specified kind");
483
18
      return *ClausesOfKind.begin();
484
18
    }
485
209
    return nullptr;
486
227
  }
clang::OMPNumTasksClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTasksClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
477
209
  static const SpecificClause *getSingleClause(ArrayRef<OMPClause *> Clauses) {
478
209
    auto ClausesOfKind = getClausesOfKind<SpecificClause>(Clauses);
479
480
209
    if (ClausesOfKind.begin() != ClausesOfKind.end()) {
481
37
      assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
482
37
             "There are at least 2 clauses of the specified kind");
483
37
      return *ClausesOfKind.begin();
484
37
    }
485
172
    return nullptr;
486
209
  }
487
488
  template <typename SpecificClause>
489
123k
  const SpecificClause *getSingleClause() const {
490
123k
    return getSingleClause<SpecificClause>(clauses());
491
123k
  }
clang::OMPHintClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPHintClause>() const
Line
Count
Source
489
112
  const SpecificClause *getSingleClause() const {
490
112
    return getSingleClause<SpecificClause>(clauses());
491
112
  }
clang::OMPDeviceClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDeviceClause>() const
Line
Count
Source
489
10.5k
  const SpecificClause *getSingleClause() const {
490
10.5k
    return getSingleClause<SpecificClause>(clauses());
491
10.5k
  }
clang::OMPDetachClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDetachClause>() const
Line
Count
Source
489
1.05k
  const SpecificClause *getSingleClause() const {
490
1.05k
    return getSingleClause<SpecificClause>(clauses());
491
1.05k
  }
clang::OMPNumTeamsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTeamsClause>() const
Line
Count
Source
489
6.18k
  const SpecificClause *getSingleClause() const {
490
6.18k
    return getSingleClause<SpecificClause>(clauses());
491
6.18k
  }
clang::OMPNumThreadsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumThreadsClause>() const
Line
Count
Source
489
6.71k
  const SpecificClause *getSingleClause() const {
490
6.71k
    return getSingleClause<SpecificClause>(clauses());
491
6.71k
  }
clang::OMPThreadLimitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPThreadLimitClause>() const
Line
Count
Source
489
13.9k
  const SpecificClause *getSingleClause() const {
490
13.9k
    return getSingleClause<SpecificClause>(clauses());
491
13.9k
  }
clang::OMPXDynCGroupMemClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPXDynCGroupMemClause>() const
Line
Count
Source
489
8.98k
  const SpecificClause *getSingleClause() const {
490
8.98k
    return getSingleClause<SpecificClause>(clauses());
491
8.98k
  }
clang::OMPXBareClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPXBareClause>() const
Line
Count
Source
489
1.54k
  const SpecificClause *getSingleClause() const {
490
1.54k
    return getSingleClause<SpecificClause>(clauses());
491
1.54k
  }
clang::OMPSimdlenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSimdlenClause>() const
Line
Count
Source
489
8.54k
  const SpecificClause *getSingleClause() const {
490
8.54k
    return getSingleClause<SpecificClause>(clauses());
491
8.54k
  }
clang::OMPSafelenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSafelenClause>() const
Line
Count
Source
489
8.54k
  const SpecificClause *getSingleClause() const {
490
8.54k
    return getSingleClause<SpecificClause>(clauses());
491
8.54k
  }
clang::OMPNowaitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNowaitClause>() const
Line
Count
Source
489
1.56k
  const SpecificClause *getSingleClause() const {
490
1.56k
    return getSingleClause<SpecificClause>(clauses());
491
1.56k
  }
clang::OMPProcBindClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPProcBindClause>() const
Line
Count
Source
489
6.55k
  const SpecificClause *getSingleClause() const {
490
6.55k
    return getSingleClause<SpecificClause>(clauses());
491
6.55k
  }
clang::OMPIfClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPIfClause>() const
Line
Count
Source
489
647
  const SpecificClause *getSingleClause() const {
490
647
    return getSingleClause<SpecificClause>(clauses());
491
647
  }
clang::OMPOrderClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPOrderClause>() const
Line
Count
Source
489
11.5k
  const SpecificClause *getSingleClause() const {
490
11.5k
    return getSingleClause<SpecificClause>(clauses());
491
11.5k
  }
clang::OMPPartialClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPPartialClause>() const
Line
Count
Source
489
15
  const SpecificClause *getSingleClause() const {
490
15
    return getSingleClause<SpecificClause>(clauses());
491
15
  }
clang::OMPOrderedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPOrderedClause>() const
Line
Count
Source
489
5.10k
  const SpecificClause *getSingleClause() const {
490
5.10k
    return getSingleClause<SpecificClause>(clauses());
491
5.10k
  }
clang::OMPScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPScheduleClause>() const
Line
Count
Source
489
5.13k
  const SpecificClause *getSingleClause() const {
490
5.13k
    return getSingleClause<SpecificClause>(clauses());
491
5.13k
  }
clang::OMPFilterClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFilterClause>() const
Line
Count
Source
489
44
  const SpecificClause *getSingleClause() const {
490
44
    return getSingleClause<SpecificClause>(clauses());
491
44
  }
clang::OMPFinalClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFinalClause>() const
Line
Count
Source
489
509
  const SpecificClause *getSingleClause() const {
490
509
    return getSingleClause<SpecificClause>(clauses());
491
509
  }
clang::OMPPriorityClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPPriorityClause>() const
Line
Count
Source
489
509
  const SpecificClause *getSingleClause() const {
490
509
    return getSingleClause<SpecificClause>(clauses());
491
509
  }
clang::OMPUntiedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUntiedClause>() const
Line
Count
Source
489
282
  const SpecificClause *getSingleClause() const {
490
282
    return getSingleClause<SpecificClause>(clauses());
491
282
  }
clang::OMPMessageClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPMessageClause>() const
Line
Count
Source
489
5
  const SpecificClause *getSingleClause() const {
490
5
    return getSingleClause<SpecificClause>(clauses());
491
5
  }
clang::OMPSeverityClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSeverityClause>() const
Line
Count
Source
489
5
  const SpecificClause *getSingleClause() const {
490
5
    return getSingleClause<SpecificClause>(clauses());
491
5
  }
clang::OMPFlushClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFlushClause>() const
Line
Count
Source
489
80
  const SpecificClause *getSingleClause() const {
490
80
    return getSingleClause<SpecificClause>(clauses());
491
80
  }
clang::OMPDepobjClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDepobjClause>() const
Line
Count
Source
489
14
  const SpecificClause *getSingleClause() const {
490
14
    return getSingleClause<SpecificClause>(clauses());
491
14
  }
clang::OMPDependClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDependClause>() const
Line
Count
Source
489
14
  const SpecificClause *getSingleClause() const {
490
14
    return getSingleClause<SpecificClause>(clauses());
491
14
  }
clang::OMPDestroyClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDestroyClause>() const
Line
Count
Source
489
18
  const SpecificClause *getSingleClause() const {
490
18
    return getSingleClause<SpecificClause>(clauses());
491
18
  }
clang::OMPUpdateClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUpdateClause>() const
Line
Count
Source
489
4
  const SpecificClause *getSingleClause() const {
490
4
    return getSingleClause<SpecificClause>(clauses());
491
4
  }
clang::OMPDistScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDistScheduleClause>() const
Line
Count
Source
489
4.60k
  const SpecificClause *getSingleClause() const {
490
4.60k
    return getSingleClause<SpecificClause>(clauses());
491
4.60k
  }
clang::OMPSIMDClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSIMDClause>() const
Line
Count
Source
489
51
  const SpecificClause *getSingleClause() const {
490
51
    return getSingleClause<SpecificClause>(clauses());
491
51
  }
clang::OMPSeqCstClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSeqCstClause>() const
Line
Count
Source
489
5.65k
  const SpecificClause *getSingleClause() const {
490
5.65k
    return getSingleClause<SpecificClause>(clauses());
491
5.65k
  }
clang::OMPAcqRelClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPAcqRelClause>() const
Line
Count
Source
489
4.77k
  const SpecificClause *getSingleClause() const {
490
4.77k
    return getSingleClause<SpecificClause>(clauses());
491
4.77k
  }
clang::OMPAcquireClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPAcquireClause>() const
Line
Count
Source
489
3.91k
  const SpecificClause *getSingleClause() const {
490
3.91k
    return getSingleClause<SpecificClause>(clauses());
491
3.91k
  }
clang::OMPReleaseClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPReleaseClause>() const
Line
Count
Source
489
3.06k
  const SpecificClause *getSingleClause() const {
490
3.06k
    return getSingleClause<SpecificClause>(clauses());
491
3.06k
  }
clang::OMPRelaxedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPRelaxedClause>() const
Line
Count
Source
489
2.20k
  const SpecificClause *getSingleClause() const {
490
2.20k
    return getSingleClause<SpecificClause>(clauses());
491
2.20k
  }
clang::OMPInitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPInitClause>() const
Line
Count
Source
489
18
  const SpecificClause *getSingleClause() const {
490
18
    return getSingleClause<SpecificClause>(clauses());
491
18
  }
clang::OMPUseClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUseClause>() const
Line
Count
Source
489
8
  const SpecificClause *getSingleClause() const {
490
8
    return getSingleClause<SpecificClause>(clauses());
491
8
  }
clang::OMPNogroupClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNogroupClause>() const
Line
Count
Source
489
227
  const SpecificClause *getSingleClause() const {
490
227
    return getSingleClause<SpecificClause>(clauses());
491
227
  }
clang::OMPGrainsizeClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPGrainsizeClause>() const
Line
Count
Source
489
227
  const SpecificClause *getSingleClause() const {
490
227
    return getSingleClause<SpecificClause>(clauses());
491
227
  }
clang::OMPNumTasksClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTasksClause>() const
Line
Count
Source
489
209
  const SpecificClause *getSingleClause() const {
490
209
    return getSingleClause<SpecificClause>(clauses());
491
209
  }
492
493
  /// Returns true if the current directive has one or more clauses of a
494
  /// specific kind.
495
  template <typename SpecificClause>
496
75.1k
  bool hasClausesOfKind() const {
497
75.1k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
75.1k
    return Clauses.begin() != Clauses.end();
499
75.1k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPDependClause>() const
Line
Count
Source
496
10.2k
  bool hasClausesOfKind() const {
497
10.2k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
10.2k
    return Clauses.begin() != Clauses.end();
499
10.2k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPDetachClause>() const
Line
Count
Source
496
1.05k
  bool hasClausesOfKind() const {
497
1.05k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
1.05k
    return Clauses.begin() != Clauses.end();
499
1.05k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNowaitClause>() const
Line
Count
Source
496
20.7k
  bool hasClausesOfKind() const {
497
20.7k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
20.7k
    return Clauses.begin() != Clauses.end();
499
20.7k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPAffinityClause>() const
Line
Count
Source
496
1.05k
  bool hasClausesOfKind() const {
497
1.05k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
1.05k
    return Clauses.begin() != Clauses.end();
499
1.05k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNumTeamsClause>() const
Line
Count
Source
496
4.54k
  bool hasClausesOfKind() const {
497
4.54k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
4.54k
    return Clauses.begin() != Clauses.end();
499
4.54k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPIfClause>() const
Line
Count
Source
496
3.01k
  bool hasClausesOfKind() const {
497
3.01k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
3.01k
    return Clauses.begin() != Clauses.end();
499
3.01k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNumThreadsClause>() const
Line
Count
Source
496
3.28k
  bool hasClausesOfKind() const {
497
3.28k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
3.28k
    return Clauses.begin() != Clauses.end();
499
3.28k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPThreadLimitClause>() const
Line
Count
Source
496
7.73k
  bool hasClausesOfKind() const {
497
7.73k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
7.73k
    return Clauses.begin() != Clauses.end();
499
7.73k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPInReductionClause>() const
Line
Count
Source
496
9.29k
  bool hasClausesOfKind() const {
497
9.29k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
9.29k
    return Clauses.begin() != Clauses.end();
499
9.29k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNontemporalClause>() const
Line
Count
Source
496
13.9k
  bool hasClausesOfKind() const {
497
13.9k
    auto Clauses = getClausesOfKind<SpecificClause>();
498
13.9k
    return Clauses.begin() != Clauses.end();
499
13.9k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPFullClause>() const
Line
Count
Source
496
18
  bool hasClausesOfKind() const {
497
18
    auto Clauses = getClausesOfKind<SpecificClause>();
498
18
    return Clauses.begin() != Clauses.end();
499
18
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPInclusiveClause>() const
Line
Count
Source
496
48
  bool hasClausesOfKind() const {
497
48
    auto Clauses = getClausesOfKind<SpecificClause>();
498
48
    return Clauses.begin() != Clauses.end();
499
48
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPDoacrossClause>() const
Line
Count
Source
496
63
  bool hasClausesOfKind() const {
497
63
    auto Clauses = getClausesOfKind<SpecificClause>();
498
63
    return Clauses.begin() != Clauses.end();
499
63
  }
500
501
  /// Returns starting location of directive kind.
502
547k
  SourceLocation getBeginLoc() const { return StartLoc; }
503
  /// Returns ending location of directive.
504
251k
  SourceLocation getEndLoc() const { return EndLoc; }
505
506
  /// Set starting location of directive kind.
507
  ///
508
  /// \param Loc New starting location of directive.
509
  ///
510
25.6k
  void setLocStart(SourceLocation Loc) { StartLoc = Loc; }
511
  /// Set ending location of directive.
512
  ///
513
  /// \param Loc New ending location of directive.
514
  ///
515
25.6k
  void setLocEnd(SourceLocation Loc) { EndLoc = Loc; }
516
517
  /// Get number of clauses.
518
48
  unsigned getNumClauses() const {
519
48
    if (!Data)
520
0
      return 0;
521
48
    return Data->getNumClauses();
522
48
  }
523
524
  /// Returns specified clause.
525
  ///
526
  /// \param I Number of clause.
527
  ///
528
0
  OMPClause *getClause(unsigned I) const { return clauses()[I]; }
529
530
  /// Returns true if directive has associated statement.
531
1.26M
  bool hasAssociatedStmt() const { return Data && 
Data->hasAssociatedStmt()1.26M
; }
532
533
  /// Returns statement associated with the directive.
534
46.4k
  const Stmt *getAssociatedStmt() const {
535
46.4k
    return const_cast<OMPExecutableDirective *>(this)->getAssociatedStmt();
536
46.4k
  }
537
340k
  Stmt *getAssociatedStmt() {
538
340k
    assert(hasAssociatedStmt() &&
539
340k
           "Expected directive with the associated statement.");
540
340k
    return Data->getAssociatedStmt();
541
340k
  }
542
543
  /// Returns the captured statement associated with the
544
  /// component region within the (combined) directive.
545
  ///
546
  /// \param RegionKind Component region kind.
547
87.7k
  const CapturedStmt *getCapturedStmt(OpenMPDirectiveKind RegionKind) const {
548
87.7k
    assert(hasAssociatedStmt() &&
549
87.7k
           "Expected directive with the associated statement.");
550
87.7k
    SmallVector<OpenMPDirectiveKind, 4> CaptureRegions;
551
87.7k
    getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind());
552
87.7k
    return Data->getCapturedStmt(RegionKind, CaptureRegions);
553
87.7k
  }
554
555
  /// Get innermost captured statement for the construct.
556
214k
  CapturedStmt *getInnermostCapturedStmt() {
557
214k
    assert(hasAssociatedStmt() &&
558
214k
           "Expected directive with the associated statement.");
559
214k
    SmallVector<OpenMPDirectiveKind, 4> CaptureRegions;
560
214k
    getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind());
561
214k
    return Data->getInnermostCapturedStmt(CaptureRegions);
562
214k
  }
563
564
77.9k
  const CapturedStmt *getInnermostCapturedStmt() const {
565
77.9k
    return const_cast<OMPExecutableDirective *>(this)
566
77.9k
        ->getInnermostCapturedStmt();
567
77.9k
  }
568
569
9.55M
  OpenMPDirectiveKind getDirectiveKind() const { return Kind; }
570
571
3.54M
  static bool classof(const Stmt *S) {
572
3.54M
    return S->getStmtClass() >= firstOMPExecutableDirectiveConstant &&
573
3.54M
           
S->getStmtClass() <= lastOMPExecutableDirectiveConstant3.24M
;
574
3.54M
  }
575
576
52.3k
  child_range children() {
577
52.3k
    if (!Data)
578
126
      return child_range(child_iterator(), child_iterator());
579
52.2k
    return Data->getAssociatedStmtAsRange();
580
52.3k
  }
581
582
0
  const_child_range children() const {
583
0
    return const_cast<OMPExecutableDirective *>(this)->children();
584
0
  }
585
586
2.43M
  ArrayRef<OMPClause *> clauses() const {
587
2.43M
    if (!Data)
588
5.93k
      return std::nullopt;
589
2.43M
    return Data->getClauses();
590
2.43M
  }
591
592
  /// Returns whether or not this is a Standalone directive.
593
  ///
594
  /// Stand-alone directives are executable directives
595
  /// that have no associated user code.
596
  bool isStandaloneDirective() const;
597
598
  /// Returns the AST node representing OpenMP structured-block of this
599
  /// OpenMP executable directive,
600
  /// Prerequisite: Executable Directive must not be Standalone directive.
601
84
  const Stmt *getStructuredBlock() const {
602
84
    return const_cast<OMPExecutableDirective *>(this)->getStructuredBlock();
603
84
  }
604
  Stmt *getStructuredBlock();
605
606
285
  const Stmt *getRawStmt() const {
607
285
    return const_cast<OMPExecutableDirective *>(this)->getRawStmt();
608
285
  }
609
234k
  Stmt *getRawStmt() {
610
234k
    assert(hasAssociatedStmt() &&
611
234k
           "Expected directive with the associated statement.");
612
234k
    return Data->getRawStmt();
613
234k
  }
614
615
174k
  OpenMPDirectiveKind getMappedDirective() const { return PrevMappedDirective; }
616
};
617
618
/// This represents '#pragma omp parallel' directive.
619
///
620
/// \code
621
/// #pragma omp parallel private(a,b) reduction(+: c,d)
622
/// \endcode
623
/// In this example directive '#pragma omp parallel' has clauses 'private'
624
/// with the variables 'a' and 'b' and 'reduction' with operator '+' and
625
/// variables 'c' and 'd'.
626
///
627
class OMPParallelDirective : public OMPExecutableDirective {
628
  friend class ASTStmtReader;
629
  friend class OMPExecutableDirective;
630
  /// true if the construct has inner cancel directive.
631
  bool HasCancel = false;
632
633
  /// Build directive with the given start and end location.
634
  ///
635
  /// \param StartLoc Starting location of the directive (directive keyword).
636
  /// \param EndLoc Ending Location of the directive.
637
  ///
638
  OMPParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc)
639
40.9k
      : OMPExecutableDirective(OMPParallelDirectiveClass,
640
40.9k
                               llvm::omp::OMPD_parallel, StartLoc, EndLoc) {}
641
642
  /// Build an empty directive.
643
  ///
644
  explicit OMPParallelDirective()
645
843
      : OMPExecutableDirective(OMPParallelDirectiveClass,
646
843
                               llvm::omp::OMPD_parallel, SourceLocation(),
647
843
                               SourceLocation()) {}
648
649
  /// Sets special task reduction descriptor.
650
40.9k
  void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
651
652
  /// Set cancel state.
653
41.7k
  void setHasCancel(bool Has) { HasCancel = Has; }
654
655
public:
656
  /// Creates directive with a list of \a Clauses.
657
  ///
658
  /// \param C AST context.
659
  /// \param StartLoc Starting location of the directive kind.
660
  /// \param EndLoc Ending Location of the directive.
661
  /// \param Clauses List of clauses.
662
  /// \param AssociatedStmt Statement associated with the directive.
663
  /// \param TaskRedRef Task reduction special reference expression to handle
664
  /// taskgroup descriptor.
665
  /// \param HasCancel true if this directive has inner cancel directive.
666
  ///
667
  static OMPParallelDirective *
668
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
669
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
670
         bool HasCancel);
671
672
  /// Creates an empty directive with the place for \a N clauses.
673
  ///
674
  /// \param C AST context.
675
  /// \param NumClauses Number of clauses.
676
  ///
677
  static OMPParallelDirective *CreateEmpty(const ASTContext &C,
678
                                           unsigned NumClauses, EmptyShell);
679
680
  /// Returns special task reduction reference expression.
681
2
  Expr *getTaskReductionRefExpr() {
682
2
    return cast_or_null<Expr>(Data->getChildren()[0]);
683
2
  }
684
2
  const Expr *getTaskReductionRefExpr() const {
685
2
    return const_cast<OMPParallelDirective *>(this)->getTaskReductionRefExpr();
686
2
  }
687
688
  /// Return true if current directive has inner cancel directive.
689
1.88k
  bool hasCancel() const { return HasCancel; }
690
691
32.0k
  static bool classof(const Stmt *T) {
692
32.0k
    return T->getStmtClass() == OMPParallelDirectiveClass;
693
32.0k
  }
694
};
695
696
/// The base class for all loop-based directives, including loop transformation
697
/// directives.
698
class OMPLoopBasedDirective : public OMPExecutableDirective {
699
  friend class ASTStmtReader;
700
701
protected:
702
  /// Number of collapsed loops as specified by 'collapse' clause.
703
  unsigned NumAssociatedLoops = 0;
704
705
  /// Build instance of loop directive of class \a Kind.
706
  ///
707
  /// \param SC Statement class.
708
  /// \param Kind Kind of OpenMP directive.
709
  /// \param StartLoc Starting location of the directive (directive keyword).
710
  /// \param EndLoc Ending location of the directive.
711
  /// \param NumAssociatedLoops Number of loops associated with the construct.
712
  ///
713
  OMPLoopBasedDirective(StmtClass SC, OpenMPDirectiveKind Kind,
714
                        SourceLocation StartLoc, SourceLocation EndLoc,
715
                        unsigned NumAssociatedLoops)
716
229k
      : OMPExecutableDirective(SC, Kind, StartLoc, EndLoc),
717
229k
        NumAssociatedLoops(NumAssociatedLoops) {}
718
719
public:
720
  /// The expressions built to support OpenMP loops in combined/composite
721
  /// pragmas (e.g. pragma omp distribute parallel for)
722
  struct DistCombinedHelperExprs {
723
    /// DistributeLowerBound - used when composing 'omp distribute' with
724
    /// 'omp for' in a same construct.
725
    Expr *LB;
726
    /// DistributeUpperBound - used when composing 'omp distribute' with
727
    /// 'omp for' in a same construct.
728
    Expr *UB;
729
    /// DistributeEnsureUpperBound - used when composing 'omp distribute'
730
    ///  with 'omp for' in a same construct, EUB depends on DistUB
731
    Expr *EUB;
732
    /// Distribute loop iteration variable init used when composing 'omp
733
    /// distribute'
734
    ///  with 'omp for' in a same construct
735
    Expr *Init;
736
    /// Distribute Loop condition used when composing 'omp distribute'
737
    ///  with 'omp for' in a same construct
738
    Expr *Cond;
739
    /// Update of LowerBound for statically scheduled omp loops for
740
    /// outer loop in combined constructs (e.g. 'distribute parallel for')
741
    Expr *NLB;
742
    /// Update of UpperBound for statically scheduled omp loops for
743
    /// outer loop in combined constructs (e.g. 'distribute parallel for')
744
    Expr *NUB;
745
    /// Distribute Loop condition used when composing 'omp distribute'
746
    ///  with 'omp for' in a same construct when schedule is chunked.
747
    Expr *DistCond;
748
    /// 'omp parallel for' loop condition used when composed with
749
    /// 'omp distribute' in the same construct and when schedule is
750
    /// chunked and the chunk size is 1.
751
    Expr *ParForInDistCond;
752
  };
753
754
  /// The expressions built for the OpenMP loop CodeGen for the
755
  /// whole collapsed loop nest.
756
  struct HelperExprs {
757
    /// Loop iteration variable.
758
    Expr *IterationVarRef;
759
    /// Loop last iteration number.
760
    Expr *LastIteration;
761
    /// Loop number of iterations.
762
    Expr *NumIterations;
763
    /// Calculation of last iteration.
764
    Expr *CalcLastIteration;
765
    /// Loop pre-condition.
766
    Expr *PreCond;
767
    /// Loop condition.
768
    Expr *Cond;
769
    /// Loop iteration variable init.
770
    Expr *Init;
771
    /// Loop increment.
772
    Expr *Inc;
773
    /// IsLastIteration - local flag variable passed to runtime.
774
    Expr *IL;
775
    /// LowerBound - local variable passed to runtime.
776
    Expr *LB;
777
    /// UpperBound - local variable passed to runtime.
778
    Expr *UB;
779
    /// Stride - local variable passed to runtime.
780
    Expr *ST;
781
    /// EnsureUpperBound -- expression UB = min(UB, NumIterations).
782
    Expr *EUB;
783
    /// Update of LowerBound for statically scheduled 'omp for' loops.
784
    Expr *NLB;
785
    /// Update of UpperBound for statically scheduled 'omp for' loops.
786
    Expr *NUB;
787
    /// PreviousLowerBound - local variable passed to runtime in the
788
    /// enclosing schedule or null if that does not apply.
789
    Expr *PrevLB;
790
    /// PreviousUpperBound - local variable passed to runtime in the
791
    /// enclosing schedule or null if that does not apply.
792
    Expr *PrevUB;
793
    /// DistInc - increment expression for distribute loop when found
794
    /// combined with a further loop level (e.g. in 'distribute parallel for')
795
    /// expression IV = IV + ST
796
    Expr *DistInc;
797
    /// PrevEUB - expression similar to EUB but to be used when loop
798
    /// scheduling uses PrevLB and PrevUB (e.g.  in 'distribute parallel for'
799
    /// when ensuring that the UB is either the calculated UB by the runtime or
800
    /// the end of the assigned distribute chunk)
801
    /// expression UB = min (UB, PrevUB)
802
    Expr *PrevEUB;
803
    /// Counters Loop counters.
804
    SmallVector<Expr *, 4> Counters;
805
    /// PrivateCounters Loop counters.
806
    SmallVector<Expr *, 4> PrivateCounters;
807
    /// Expressions for loop counters inits for CodeGen.
808
    SmallVector<Expr *, 4> Inits;
809
    /// Expressions for loop counters update for CodeGen.
810
    SmallVector<Expr *, 4> Updates;
811
    /// Final loop counter values for GodeGen.
812
    SmallVector<Expr *, 4> Finals;
813
    /// List of counters required for the generation of the non-rectangular
814
    /// loops.
815
    SmallVector<Expr *, 4> DependentCounters;
816
    /// List of initializers required for the generation of the non-rectangular
817
    /// loops.
818
    SmallVector<Expr *, 4> DependentInits;
819
    /// List of final conditions required for the generation of the
820
    /// non-rectangular loops.
821
    SmallVector<Expr *, 4> FinalsConditions;
822
    /// Init statement for all captured expressions.
823
    Stmt *PreInits;
824
825
    /// Expressions used when combining OpenMP loop pragmas
826
    DistCombinedHelperExprs DistCombinedFields;
827
828
    /// Check if all the expressions are built (does not check the
829
    /// worksharing ones).
830
155k
    bool builtAll() {
831
155k
      return IterationVarRef != nullptr && LastIteration != nullptr &&
832
155k
             NumIterations != nullptr && PreCond != nullptr &&
833
155k
             Cond != nullptr && Init != nullptr && Inc != nullptr;
834
155k
    }
835
836
    /// Initialize all the fields to null.
837
    /// \param Size Number of elements in the
838
    /// counters/finals/updates/dependent_counters/dependent_inits/finals_conditions
839
    /// arrays.
840
222k
    void clear(unsigned Size) {
841
222k
      IterationVarRef = nullptr;
842
222k
      LastIteration = nullptr;
843
222k
      CalcLastIteration = nullptr;
844
222k
      PreCond = nullptr;
845
222k
      Cond = nullptr;
846
222k
      Init = nullptr;
847
222k
      Inc = nullptr;
848
222k
      IL = nullptr;
849
222k
      LB = nullptr;
850
222k
      UB = nullptr;
851
222k
      ST = nullptr;
852
222k
      EUB = nullptr;
853
222k
      NLB = nullptr;
854
222k
      NUB = nullptr;
855
222k
      NumIterations = nullptr;
856
222k
      PrevLB = nullptr;
857
222k
      PrevUB = nullptr;
858
222k
      DistInc = nullptr;
859
222k
      PrevEUB = nullptr;
860
222k
      Counters.resize(Size);
861
222k
      PrivateCounters.resize(Size);
862
222k
      Inits.resize(Size);
863
222k
      Updates.resize(Size);
864
222k
      Finals.resize(Size);
865
222k
      DependentCounters.resize(Size);
866
222k
      DependentInits.resize(Size);
867
222k
      FinalsConditions.resize(Size);
868
446k
      for (unsigned I = 0; I < Size; 
++I224k
) {
869
224k
        Counters[I] = nullptr;
870
224k
        PrivateCounters[I] = nullptr;
871
224k
        Inits[I] = nullptr;
872
224k
        Updates[I] = nullptr;
873
224k
        Finals[I] = nullptr;
874
224k
        DependentCounters[I] = nullptr;
875
224k
        DependentInits[I] = nullptr;
876
224k
        FinalsConditions[I] = nullptr;
877
224k
      }
878
222k
      PreInits = nullptr;
879
222k
      DistCombinedFields.LB = nullptr;
880
222k
      DistCombinedFields.UB = nullptr;
881
222k
      DistCombinedFields.EUB = nullptr;
882
222k
      DistCombinedFields.Init = nullptr;
883
222k
      DistCombinedFields.Cond = nullptr;
884
222k
      DistCombinedFields.NLB = nullptr;
885
222k
      DistCombinedFields.NUB = nullptr;
886
222k
      DistCombinedFields.DistCond = nullptr;
887
222k
      DistCombinedFields.ParForInDistCond = nullptr;
888
222k
    }
889
  };
890
891
  /// Get number of collapsed loops.
892
5.36M
  unsigned getLoopsNumber() const { return NumAssociatedLoops; }
893
894
  /// Try to find the next loop sub-statement in the specified statement \p
895
  /// CurStmt.
896
  /// \param TryImperfectlyNestedLoops true, if we need to try to look for the
897
  /// imperfectly nested loop.
898
  static Stmt *tryToFindNextInnerLoop(Stmt *CurStmt,
899
                                      bool TryImperfectlyNestedLoops);
900
  static const Stmt *tryToFindNextInnerLoop(const Stmt *CurStmt,
901
12.1k
                                            bool TryImperfectlyNestedLoops) {
902
12.1k
    return tryToFindNextInnerLoop(const_cast<Stmt *>(CurStmt),
903
12.1k
                                  TryImperfectlyNestedLoops);
904
12.1k
  }
905
906
  /// Calls the specified callback function for all the loops in \p CurStmt,
907
  /// from the outermost to the innermost.
908
  static bool
909
  doForAllLoops(Stmt *CurStmt, bool TryImperfectlyNestedLoops,
910
                unsigned NumLoops,
911
                llvm::function_ref<bool(unsigned, Stmt *)> Callback,
912
                llvm::function_ref<void(OMPLoopTransformationDirective *)>
913
                    OnTransformationCallback);
914
  static bool
915
  doForAllLoops(const Stmt *CurStmt, bool TryImperfectlyNestedLoops,
916
                unsigned NumLoops,
917
                llvm::function_ref<bool(unsigned, const Stmt *)> Callback,
918
                llvm::function_ref<void(const OMPLoopTransformationDirective *)>
919
0
                    OnTransformationCallback) {
920
0
    auto &&NewCallback = [Callback](unsigned Cnt, Stmt *CurStmt) {
921
0
      return Callback(Cnt, CurStmt);
922
0
    };
923
0
    auto &&NewTransformCb =
924
0
        [OnTransformationCallback](OMPLoopTransformationDirective *A) {
925
0
          OnTransformationCallback(A);
926
0
        };
927
0
    return doForAllLoops(const_cast<Stmt *>(CurStmt), TryImperfectlyNestedLoops,
928
0
                         NumLoops, NewCallback, NewTransformCb);
929
0
  }
930
931
  /// Calls the specified callback function for all the loops in \p CurStmt,
932
  /// from the outermost to the innermost.
933
  static bool
934
  doForAllLoops(Stmt *CurStmt, bool TryImperfectlyNestedLoops,
935
                unsigned NumLoops,
936
22.4k
                llvm::function_ref<bool(unsigned, Stmt *)> Callback) {
937
22.4k
    auto &&TransformCb = [](OMPLoopTransformationDirective *) 
{}26
;
938
22.4k
    return doForAllLoops(CurStmt, TryImperfectlyNestedLoops, NumLoops, Callback,
939
22.4k
                         TransformCb);
940
22.4k
  }
941
  static bool
942
  doForAllLoops(const Stmt *CurStmt, bool TryImperfectlyNestedLoops,
943
                unsigned NumLoops,
944
17.9k
                llvm::function_ref<bool(unsigned, const Stmt *)> Callback) {
945
18.8k
    auto &&NewCallback = [Callback](unsigned Cnt, const Stmt *CurStmt) {
946
18.8k
      return Callback(Cnt, CurStmt);
947
18.8k
    };
948
17.9k
    return doForAllLoops(const_cast<Stmt *>(CurStmt), TryImperfectlyNestedLoops,
949
17.9k
                         NumLoops, NewCallback);
950
17.9k
  }
951
952
  /// Calls the specified callback function for all the loop bodies in \p
953
  /// CurStmt, from the outermost loop to the innermost.
954
  static void doForAllLoopsBodies(
955
      Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
956
      llvm::function_ref<void(unsigned, Stmt *, Stmt *)> Callback);
957
  static void doForAllLoopsBodies(
958
      const Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
959
0
      llvm::function_ref<void(unsigned, const Stmt *, const Stmt *)> Callback) {
960
0
    auto &&NewCallback = [Callback](unsigned Cnt, Stmt *Loop, Stmt *Body) {
961
0
      Callback(Cnt, Loop, Body);
962
0
    };
963
0
    doForAllLoopsBodies(const_cast<Stmt *>(CurStmt), TryImperfectlyNestedLoops,
964
0
                        NumLoops, NewCallback);
965
0
  }
966
967
26.3k
  static bool classof(const Stmt *T) {
968
26.3k
    if (auto *D = dyn_cast<OMPExecutableDirective>(T))
969
1.82k
      return isOpenMPLoopDirective(D->getDirectiveKind());
970
24.5k
    return false;
971
26.3k
  }
972
};
973
974
/// The base class for all loop transformation directives.
975
class OMPLoopTransformationDirective : public OMPLoopBasedDirective {
976
  friend class ASTStmtReader;
977
978
  /// Number of loops generated by this loop transformation.
979
  unsigned NumGeneratedLoops = 0;
980
981
protected:
982
  explicit OMPLoopTransformationDirective(StmtClass SC,
983
                                          OpenMPDirectiveKind Kind,
984
                                          SourceLocation StartLoc,
985
                                          SourceLocation EndLoc,
986
                                          unsigned NumAssociatedLoops)
987
221
      : OMPLoopBasedDirective(SC, Kind, StartLoc, EndLoc, NumAssociatedLoops) {}
988
989
  /// Set the number of loops generated by this loop transformation.
990
247
  void setNumGeneratedLoops(unsigned Num) { NumGeneratedLoops = Num; }
991
992
public:
993
  /// Return the number of associated (consumed) loops.
994
0
  unsigned getNumAssociatedLoops() const { return getLoopsNumber(); }
995
996
  /// Return the number of loops generated by this loop transformation.
997
45
  unsigned getNumGeneratedLoops() const { return NumGeneratedLoops; }
998
999
  /// Get the de-sugared statements after the loop transformation.
1000
  ///
1001
  /// Might be nullptr if either the directive generates no loops and is handled
1002
  /// directly in CodeGen, or resolving a template-dependence context is
1003
  /// required.
1004
  Stmt *getTransformedStmt() const;
1005
1006
  /// Return preinits statement.
1007
  Stmt *getPreInits() const;
1008
1009
269k
  static bool classof(const Stmt *T) {
1010
269k
    return T->getStmtClass() == OMPTileDirectiveClass ||
1011
269k
           
T->getStmtClass() == OMPUnrollDirectiveClass269k
;
1012
269k
  }
1013
};
1014
1015
/// This is a common base class for loop directives ('omp simd', 'omp
1016
/// for', 'omp for simd' etc.). It is responsible for the loop code generation.
1017
///
1018
class OMPLoopDirective : public OMPLoopBasedDirective {
1019
  friend class ASTStmtReader;
1020
1021
  /// Offsets to the stored exprs.
1022
  /// This enumeration contains offsets to all the pointers to children
1023
  /// expressions stored in OMPLoopDirective.
1024
  /// The first 9 children are necessary for all the loop directives,
1025
  /// the next 8 are specific to the worksharing ones, and the next 11 are
1026
  /// used for combined constructs containing two pragmas associated to loops.
1027
  /// After the fixed children, three arrays of length NumAssociatedLoops are
1028
  /// allocated: loop counters, their updates and final values.
1029
  /// PrevLowerBound and PrevUpperBound are used to communicate blocking
1030
  /// information in composite constructs which require loop blocking
1031
  /// DistInc is used to generate the increment expression for the distribute
1032
  /// loop when combined with a further nested loop
1033
  /// PrevEnsureUpperBound is used as the EnsureUpperBound expression for the
1034
  /// for loop when combined with a previous distribute loop in the same pragma
1035
  /// (e.g. 'distribute parallel for')
1036
  ///
1037
  enum {
1038
    IterationVariableOffset = 0,
1039
    LastIterationOffset = 1,
1040
    CalcLastIterationOffset = 2,
1041
    PreConditionOffset = 3,
1042
    CondOffset = 4,
1043
    InitOffset = 5,
1044
    IncOffset = 6,
1045
    PreInitsOffset = 7,
1046
    // The '...End' enumerators do not correspond to child expressions - they
1047
    // specify the offset to the end (and start of the following counters/
1048
    // updates/finals/dependent_counters/dependent_inits/finals_conditions
1049
    // arrays).
1050
    DefaultEnd = 8,
1051
    // The following 8 exprs are used by worksharing and distribute loops only.
1052
    IsLastIterVariableOffset = 8,
1053
    LowerBoundVariableOffset = 9,
1054
    UpperBoundVariableOffset = 10,
1055
    StrideVariableOffset = 11,
1056
    EnsureUpperBoundOffset = 12,
1057
    NextLowerBoundOffset = 13,
1058
    NextUpperBoundOffset = 14,
1059
    NumIterationsOffset = 15,
1060
    // Offset to the end for worksharing loop directives.
1061
    WorksharingEnd = 16,
1062
    PrevLowerBoundVariableOffset = 16,
1063
    PrevUpperBoundVariableOffset = 17,
1064
    DistIncOffset = 18,
1065
    PrevEnsureUpperBoundOffset = 19,
1066
    CombinedLowerBoundVariableOffset = 20,
1067
    CombinedUpperBoundVariableOffset = 21,
1068
    CombinedEnsureUpperBoundOffset = 22,
1069
    CombinedInitOffset = 23,
1070
    CombinedConditionOffset = 24,
1071
    CombinedNextLowerBoundOffset = 25,
1072
    CombinedNextUpperBoundOffset = 26,
1073
    CombinedDistConditionOffset = 27,
1074
    CombinedParForInDistConditionOffset = 28,
1075
    // Offset to the end (and start of the following
1076
    // counters/updates/finals/dependent_counters/dependent_inits/finals_conditions
1077
    // arrays) for combined distribute loop directives.
1078
    CombinedDistributeEnd = 29,
1079
  };
1080
1081
  /// Get the counters storage.
1082
283k
  MutableArrayRef<Expr *> getCounters() {
1083
283k
    auto **Storage = reinterpret_cast<Expr **>(
1084
283k
        &Data->getChildren()[getArraysOffset(getDirectiveKind())]);
1085
283k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1086
283k
  }
1087
1088
  /// Get the private counters storage.
1089
246k
  MutableArrayRef<Expr *> getPrivateCounters() {
1090
246k
    auto **Storage = reinterpret_cast<Expr **>(
1091
246k
        &Data->getChildren()[getArraysOffset(getDirectiveKind()) +
1092
246k
                             getLoopsNumber()]);
1093
246k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1094
246k
  }
1095
1096
  /// Get the updates storage.
1097
223k
  MutableArrayRef<Expr *> getInits() {
1098
223k
    auto **Storage = reinterpret_cast<Expr **>(
1099
223k
        &Data->getChildren()[getArraysOffset(getDirectiveKind()) +
1100
223k
                             2 * getLoopsNumber()]);
1101
223k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1102
223k
  }
1103
1104
  /// Get the updates storage.
1105
232k
  MutableArrayRef<Expr *> getUpdates() {
1106
232k
    auto **Storage = reinterpret_cast<Expr **>(
1107
232k
        &Data->getChildren()[getArraysOffset(getDirectiveKind()) +
1108
232k
                             3 * getLoopsNumber()]);
1109
232k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1110
232k
  }
1111
1112
  /// Get the final counter updates storage.
1113
229k
  MutableArrayRef<Expr *> getFinals() {
1114
229k
    auto **Storage = reinterpret_cast<Expr **>(
1115
229k
        &Data->getChildren()[getArraysOffset(getDirectiveKind()) +
1116
229k
                             4 * getLoopsNumber()]);
1117
229k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1118
229k
  }
1119
1120
  /// Get the dependent counters storage.
1121
223k
  MutableArrayRef<Expr *> getDependentCounters() {
1122
223k
    auto **Storage = reinterpret_cast<Expr **>(
1123
223k
        &Data->getChildren()[getArraysOffset(getDirectiveKind()) +
1124
223k
                             5 * getLoopsNumber()]);
1125
223k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1126
223k
  }
1127
1128
  /// Get the dependent inits storage.
1129
223k
  MutableArrayRef<Expr *> getDependentInits() {
1130
223k
    auto **Storage = reinterpret_cast<Expr **>(
1131
223k
        &Data->getChildren()[getArraysOffset(getDirectiveKind()) +
1132
223k
                             6 * getLoopsNumber()]);
1133
223k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1134
223k
  }
1135
1136
  /// Get the finals conditions storage.
1137
232k
  MutableArrayRef<Expr *> getFinalsConditions() {
1138
232k
    auto **Storage = reinterpret_cast<Expr **>(
1139
232k
        &Data->getChildren()[getArraysOffset(getDirectiveKind()) +
1140
232k
                             7 * getLoopsNumber()]);
1141
232k
    return llvm::MutableArrayRef(Storage, getLoopsNumber());
1142
232k
  }
1143
1144
protected:
1145
  /// Build instance of loop directive of class \a Kind.
1146
  ///
1147
  /// \param SC Statement class.
1148
  /// \param Kind Kind of OpenMP directive.
1149
  /// \param StartLoc Starting location of the directive (directive keyword).
1150
  /// \param EndLoc Ending location of the directive.
1151
  /// \param CollapsedNum Number of collapsed loops from 'collapse' clause.
1152
  ///
1153
  OMPLoopDirective(StmtClass SC, OpenMPDirectiveKind Kind,
1154
                   SourceLocation StartLoc, SourceLocation EndLoc,
1155
                   unsigned CollapsedNum)
1156
228k
      : OMPLoopBasedDirective(SC, Kind, StartLoc, EndLoc, CollapsedNum) {}
1157
1158
  /// Offset to the start of children expression arrays.
1159
2.17M
  static unsigned getArraysOffset(OpenMPDirectiveKind Kind) {
1160
2.17M
    if (isOpenMPLoopBoundSharingDirective(Kind))
1161
529k
      return CombinedDistributeEnd;
1162
1.64M
    if (isOpenMPWorksharingDirective(Kind) || 
isOpenMPTaskLoopDirective(Kind)1.09M
||
1163
1.64M
        
isOpenMPGenericLoopDirective(Kind)582k
||
isOpenMPDistributeDirective(Kind)582k
)
1164
1.45M
      return WorksharingEnd;
1165
188k
    return DefaultEnd;
1166
1.64M
  }
1167
1168
  /// Children number.
1169
  static unsigned numLoopChildren(unsigned CollapsedNum,
1170
278k
                                  OpenMPDirectiveKind Kind) {
1171
278k
    return getArraysOffset(Kind) +
1172
278k
           8 * CollapsedNum; // Counters, PrivateCounters, Inits,
1173
                             // Updates, Finals, DependentCounters,
1174
                             // DependentInits, FinalsConditions.
1175
278k
  }
1176
1177
220k
  void setIterationVariable(Expr *IV) {
1178
220k
    Data->getChildren()[IterationVariableOffset] = IV;
1179
220k
  }
1180
220k
  void setLastIteration(Expr *LI) {
1181
220k
    Data->getChildren()[LastIterationOffset] = LI;
1182
220k
  }
1183
220k
  void setCalcLastIteration(Expr *CLI) {
1184
220k
    Data->getChildren()[CalcLastIterationOffset] = CLI;
1185
220k
  }
1186
220k
  void setPreCond(Expr *PC) { Data->getChildren()[PreConditionOffset] = PC; }
1187
220k
  void setCond(Expr *Cond) { Data->getChildren()[CondOffset] = Cond; }
1188
220k
  void setInit(Expr *Init) { Data->getChildren()[InitOffset] = Init; }
1189
220k
  void setInc(Expr *Inc) { Data->getChildren()[IncOffset] = Inc; }
1190
220k
  void setPreInits(Stmt *PreInits) {
1191
220k
    Data->getChildren()[PreInitsOffset] = PreInits;
1192
220k
  }
1193
201k
  void setIsLastIterVariable(Expr *IL) {
1194
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1195
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1196
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1197
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1198
201k
           "expected worksharing loop directive");
1199
201k
    Data->getChildren()[IsLastIterVariableOffset] = IL;
1200
201k
  }
1201
201k
  void setLowerBoundVariable(Expr *LB) {
1202
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1203
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1204
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1205
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1206
201k
           "expected worksharing loop directive");
1207
201k
    Data->getChildren()[LowerBoundVariableOffset] = LB;
1208
201k
  }
1209
201k
  void setUpperBoundVariable(Expr *UB) {
1210
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1211
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1212
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1213
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1214
201k
           "expected worksharing loop directive");
1215
201k
    Data->getChildren()[UpperBoundVariableOffset] = UB;
1216
201k
  }
1217
201k
  void setStrideVariable(Expr *ST) {
1218
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1219
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1220
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1221
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1222
201k
           "expected worksharing loop directive");
1223
201k
    Data->getChildren()[StrideVariableOffset] = ST;
1224
201k
  }
1225
201k
  void setEnsureUpperBound(Expr *EUB) {
1226
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1227
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1228
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1229
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1230
201k
           "expected worksharing loop directive");
1231
201k
    Data->getChildren()[EnsureUpperBoundOffset] = EUB;
1232
201k
  }
1233
201k
  void setNextLowerBound(Expr *NLB) {
1234
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1235
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1236
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1237
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1238
201k
           "expected worksharing loop directive");
1239
201k
    Data->getChildren()[NextLowerBoundOffset] = NLB;
1240
201k
  }
1241
201k
  void setNextUpperBound(Expr *NUB) {
1242
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1243
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1244
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1245
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1246
201k
           "expected worksharing loop directive");
1247
201k
    Data->getChildren()[NextUpperBoundOffset] = NUB;
1248
201k
  }
1249
201k
  void setNumIterations(Expr *NI) {
1250
201k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1251
201k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1252
201k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1253
201k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1254
201k
           "expected worksharing loop directive");
1255
201k
    Data->getChildren()[NumIterationsOffset] = NI;
1256
201k
  }
1257
49.5k
  void setPrevLowerBoundVariable(Expr *PrevLB) {
1258
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1259
49.5k
           "expected loop bound sharing directive");
1260
49.5k
    Data->getChildren()[PrevLowerBoundVariableOffset] = PrevLB;
1261
49.5k
  }
1262
49.5k
  void setPrevUpperBoundVariable(Expr *PrevUB) {
1263
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1264
49.5k
           "expected loop bound sharing directive");
1265
49.5k
    Data->getChildren()[PrevUpperBoundVariableOffset] = PrevUB;
1266
49.5k
  }
1267
49.5k
  void setDistInc(Expr *DistInc) {
1268
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1269
49.5k
           "expected loop bound sharing directive");
1270
49.5k
    Data->getChildren()[DistIncOffset] = DistInc;
1271
49.5k
  }
1272
49.5k
  void setPrevEnsureUpperBound(Expr *PrevEUB) {
1273
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1274
49.5k
           "expected loop bound sharing directive");
1275
49.5k
    Data->getChildren()[PrevEnsureUpperBoundOffset] = PrevEUB;
1276
49.5k
  }
1277
49.5k
  void setCombinedLowerBoundVariable(Expr *CombLB) {
1278
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1279
49.5k
           "expected loop bound sharing directive");
1280
49.5k
    Data->getChildren()[CombinedLowerBoundVariableOffset] = CombLB;
1281
49.5k
  }
1282
49.5k
  void setCombinedUpperBoundVariable(Expr *CombUB) {
1283
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1284
49.5k
           "expected loop bound sharing directive");
1285
49.5k
    Data->getChildren()[CombinedUpperBoundVariableOffset] = CombUB;
1286
49.5k
  }
1287
49.5k
  void setCombinedEnsureUpperBound(Expr *CombEUB) {
1288
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1289
49.5k
           "expected loop bound sharing directive");
1290
49.5k
    Data->getChildren()[CombinedEnsureUpperBoundOffset] = CombEUB;
1291
49.5k
  }
1292
49.5k
  void setCombinedInit(Expr *CombInit) {
1293
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1294
49.5k
           "expected loop bound sharing directive");
1295
49.5k
    Data->getChildren()[CombinedInitOffset] = CombInit;
1296
49.5k
  }
1297
49.5k
  void setCombinedCond(Expr *CombCond) {
1298
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1299
49.5k
           "expected loop bound sharing directive");
1300
49.5k
    Data->getChildren()[CombinedConditionOffset] = CombCond;
1301
49.5k
  }
1302
49.5k
  void setCombinedNextLowerBound(Expr *CombNLB) {
1303
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1304
49.5k
           "expected loop bound sharing directive");
1305
49.5k
    Data->getChildren()[CombinedNextLowerBoundOffset] = CombNLB;
1306
49.5k
  }
1307
49.5k
  void setCombinedNextUpperBound(Expr *CombNUB) {
1308
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1309
49.5k
           "expected loop bound sharing directive");
1310
49.5k
    Data->getChildren()[CombinedNextUpperBoundOffset] = CombNUB;
1311
49.5k
  }
1312
49.5k
  void setCombinedDistCond(Expr *CombDistCond) {
1313
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1314
49.5k
           "expected loop bound distribute sharing directive");
1315
49.5k
    Data->getChildren()[CombinedDistConditionOffset] = CombDistCond;
1316
49.5k
  }
1317
49.5k
  void setCombinedParForInDistCond(Expr *CombParForInDistCond) {
1318
49.5k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1319
49.5k
           "expected loop bound distribute sharing directive");
1320
49.5k
    Data->getChildren()[CombinedParForInDistConditionOffset] =
1321
49.5k
        CombParForInDistCond;
1322
49.5k
  }
1323
  void setCounters(ArrayRef<Expr *> A);
1324
  void setPrivateCounters(ArrayRef<Expr *> A);
1325
  void setInits(ArrayRef<Expr *> A);
1326
  void setUpdates(ArrayRef<Expr *> A);
1327
  void setFinals(ArrayRef<Expr *> A);
1328
  void setDependentCounters(ArrayRef<Expr *> A);
1329
  void setDependentInits(ArrayRef<Expr *> A);
1330
  void setFinalsConditions(ArrayRef<Expr *> A);
1331
1332
public:
1333
32.6k
  Expr *getIterationVariable() const {
1334
32.6k
    return cast<Expr>(Data->getChildren()[IterationVariableOffset]);
1335
32.6k
  }
1336
14.3k
  Expr *getLastIteration() const {
1337
14.3k
    return cast<Expr>(Data->getChildren()[LastIterationOffset]);
1338
14.3k
  }
1339
0
  Expr *getCalcLastIteration() const {
1340
0
    return cast<Expr>(Data->getChildren()[CalcLastIterationOffset]);
1341
0
  }
1342
16.8k
  Expr *getPreCond() const {
1343
16.8k
    return cast<Expr>(Data->getChildren()[PreConditionOffset]);
1344
16.8k
  }
1345
11.3k
  Expr *getCond() const { return cast<Expr>(Data->getChildren()[CondOffset]); }
1346
11.3k
  Expr *getInit() const { return cast<Expr>(Data->getChildren()[InitOffset]); }
1347
11.4k
  Expr *getInc() const { return cast<Expr>(Data->getChildren()[IncOffset]); }
1348
17.9k
  const Stmt *getPreInits() const {
1349
17.9k
    return Data->getChildren()[PreInitsOffset];
1350
17.9k
  }
1351
0
  Stmt *getPreInits() { return Data->getChildren()[PreInitsOffset]; }
1352
9.92k
  Expr *getIsLastIterVariable() const {
1353
9.92k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1354
9.92k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1355
9.92k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1356
9.92k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1357
9.92k
           "expected worksharing loop directive");
1358
9.92k
    return cast<Expr>(Data->getChildren()[IsLastIterVariableOffset]);
1359
9.92k
  }
1360
10.2k
  Expr *getLowerBoundVariable() const {
1361
10.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1362
10.2k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1363
10.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1364
10.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1365
10.2k
           "expected worksharing loop directive");
1366
10.2k
    return cast<Expr>(Data->getChildren()[LowerBoundVariableOffset]);
1367
10.2k
  }
1368
10.2k
  Expr *getUpperBoundVariable() const {
1369
10.2k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1370
10.2k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1371
10.2k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1372
10.2k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1373
10.2k
           "expected worksharing loop directive");
1374
10.2k
    return cast<Expr>(Data->getChildren()[UpperBoundVariableOffset]);
1375
10.2k
  }
1376
10.1k
  Expr *getStrideVariable() const {
1377
10.1k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1378
10.1k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1379
10.1k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1380
10.1k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1381
10.1k
           "expected worksharing loop directive");
1382
10.1k
    return cast<Expr>(Data->getChildren()[StrideVariableOffset]);
1383
10.1k
  }
1384
8.30k
  Expr *getEnsureUpperBound() const {
1385
8.30k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1386
8.30k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1387
8.30k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1388
8.30k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1389
8.30k
           "expected worksharing loop directive");
1390
8.30k
    return cast<Expr>(Data->getChildren()[EnsureUpperBoundOffset]);
1391
8.30k
  }
1392
1.02k
  Expr *getNextLowerBound() const {
1393
1.02k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1394
1.02k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1395
1.02k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1396
1.02k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1397
1.02k
           "expected worksharing loop directive");
1398
1.02k
    return cast<Expr>(Data->getChildren()[NextLowerBoundOffset]);
1399
1.02k
  }
1400
1.02k
  Expr *getNextUpperBound() const {
1401
1.02k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1402
1.02k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1403
1.02k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1404
1.02k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1405
1.02k
           "expected worksharing loop directive");
1406
1.02k
    return cast<Expr>(Data->getChildren()[NextUpperBoundOffset]);
1407
1.02k
  }
1408
3.53k
  Expr *getNumIterations() const {
1409
3.53k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1410
3.53k
            isOpenMPGenericLoopDirective(getDirectiveKind()) ||
1411
3.53k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1412
3.53k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1413
3.53k
           "expected worksharing loop directive");
1414
3.53k
    return cast<Expr>(Data->getChildren()[NumIterationsOffset]);
1415
3.53k
  }
1416
11.2k
  Expr *getPrevLowerBoundVariable() const {
1417
11.2k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1418
11.2k
           "expected loop bound sharing directive");
1419
11.2k
    return cast<Expr>(Data->getChildren()[PrevLowerBoundVariableOffset]);
1420
11.2k
  }
1421
11.2k
  Expr *getPrevUpperBoundVariable() const {
1422
11.2k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1423
11.2k
           "expected loop bound sharing directive");
1424
11.2k
    return cast<Expr>(Data->getChildren()[PrevUpperBoundVariableOffset]);
1425
11.2k
  }
1426
2.92k
  Expr *getDistInc() const {
1427
2.92k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1428
2.92k
           "expected loop bound sharing directive");
1429
2.92k
    return cast<Expr>(Data->getChildren()[DistIncOffset]);
1430
2.92k
  }
1431
2.80k
  Expr *getPrevEnsureUpperBound() const {
1432
2.80k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1433
2.80k
           "expected loop bound sharing directive");
1434
2.80k
    return cast<Expr>(Data->getChildren()[PrevEnsureUpperBoundOffset]);
1435
2.80k
  }
1436
5.59k
  Expr *getCombinedLowerBoundVariable() const {
1437
5.59k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1438
5.59k
           "expected loop bound sharing directive");
1439
5.59k
    return cast<Expr>(Data->getChildren()[CombinedLowerBoundVariableOffset]);
1440
5.59k
  }
1441
5.59k
  Expr *getCombinedUpperBoundVariable() const {
1442
5.59k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1443
5.59k
           "expected loop bound sharing directive");
1444
5.59k
    return cast<Expr>(Data->getChildren()[CombinedUpperBoundVariableOffset]);
1445
5.59k
  }
1446
3.10k
  Expr *getCombinedEnsureUpperBound() const {
1447
3.10k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1448
3.10k
           "expected loop bound sharing directive");
1449
3.10k
    return cast<Expr>(Data->getChildren()[CombinedEnsureUpperBoundOffset]);
1450
3.10k
  }
1451
3.10k
  Expr *getCombinedInit() const {
1452
3.10k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1453
3.10k
           "expected loop bound sharing directive");
1454
3.10k
    return cast<Expr>(Data->getChildren()[CombinedInitOffset]);
1455
3.10k
  }
1456
2.78k
  Expr *getCombinedCond() const {
1457
2.78k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1458
2.78k
           "expected loop bound sharing directive");
1459
2.78k
    return cast<Expr>(Data->getChildren()[CombinedConditionOffset]);
1460
2.78k
  }
1461
316
  Expr *getCombinedNextLowerBound() const {
1462
316
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1463
316
           "expected loop bound sharing directive");
1464
316
    return cast<Expr>(Data->getChildren()[CombinedNextLowerBoundOffset]);
1465
316
  }
1466
316
  Expr *getCombinedNextUpperBound() const {
1467
316
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1468
316
           "expected loop bound sharing directive");
1469
316
    return cast<Expr>(Data->getChildren()[CombinedNextUpperBoundOffset]);
1470
316
  }
1471
313
  Expr *getCombinedDistCond() const {
1472
313
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1473
313
           "expected loop bound distribute sharing directive");
1474
313
    return cast<Expr>(Data->getChildren()[CombinedDistConditionOffset]);
1475
313
  }
1476
139
  Expr *getCombinedParForInDistCond() const {
1477
139
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1478
139
           "expected loop bound distribute sharing directive");
1479
139
    return cast<Expr>(Data->getChildren()[CombinedParForInDistConditionOffset]);
1480
139
  }
1481
  Stmt *getBody();
1482
37
  const Stmt *getBody() const {
1483
37
    return const_cast<OMPLoopDirective *>(this)->getBody();
1484
37
  }
1485
1486
0
  ArrayRef<Expr *> counters() { return getCounters(); }
1487
1488
62.1k
  ArrayRef<Expr *> counters() const {
1489
62.1k
    return const_cast<OMPLoopDirective *>(this)->getCounters();
1490
62.1k
  }
1491
1492
0
  ArrayRef<Expr *> private_counters() { return getPrivateCounters(); }
1493
1494
25.2k
  ArrayRef<Expr *> private_counters() const {
1495
25.2k
    return const_cast<OMPLoopDirective *>(this)->getPrivateCounters();
1496
25.2k
  }
1497
1498
0
  ArrayRef<Expr *> inits() { return getInits(); }
1499
1500
2.65k
  ArrayRef<Expr *> inits() const {
1501
2.65k
    return const_cast<OMPLoopDirective *>(this)->getInits();
1502
2.65k
  }
1503
1504
0
  ArrayRef<Expr *> updates() { return getUpdates(); }
1505
1506
11.4k
  ArrayRef<Expr *> updates() const {
1507
11.4k
    return const_cast<OMPLoopDirective *>(this)->getUpdates();
1508
11.4k
  }
1509
1510
0
  ArrayRef<Expr *> finals() { return getFinals(); }
1511
1512
9.05k
  ArrayRef<Expr *> finals() const {
1513
9.05k
    return const_cast<OMPLoopDirective *>(this)->getFinals();
1514
9.05k
  }
1515
1516
0
  ArrayRef<Expr *> dependent_counters() { return getDependentCounters(); }
1517
1518
2.65k
  ArrayRef<Expr *> dependent_counters() const {
1519
2.65k
    return const_cast<OMPLoopDirective *>(this)->getDependentCounters();
1520
2.65k
  }
1521
1522
0
  ArrayRef<Expr *> dependent_inits() { return getDependentInits(); }
1523
1524
2.65k
  ArrayRef<Expr *> dependent_inits() const {
1525
2.65k
    return const_cast<OMPLoopDirective *>(this)->getDependentInits();
1526
2.65k
  }
1527
1528
0
  ArrayRef<Expr *> finals_conditions() { return getFinalsConditions(); }
1529
1530
11.4k
  ArrayRef<Expr *> finals_conditions() const {
1531
11.4k
    return const_cast<OMPLoopDirective *>(this)->getFinalsConditions();
1532
11.4k
  }
1533
1534
62.0k
  static bool classof(const Stmt *T) {
1535
62.0k
    return T->getStmtClass() == OMPSimdDirectiveClass ||
1536
62.0k
           
T->getStmtClass() == OMPForDirectiveClass60.9k
||
1537
62.0k
           
T->getStmtClass() == OMPForSimdDirectiveClass59.4k
||
1538
62.0k
           
T->getStmtClass() == OMPParallelForDirectiveClass58.3k
||
1539
62.0k
           
T->getStmtClass() == OMPParallelForSimdDirectiveClass57.3k
||
1540
62.0k
           
T->getStmtClass() == OMPTaskLoopDirectiveClass56.5k
||
1541
62.0k
           
T->getStmtClass() == OMPTaskLoopSimdDirectiveClass56.3k
||
1542
62.0k
           
T->getStmtClass() == OMPMaskedTaskLoopDirectiveClass56.0k
||
1543
62.0k
           
T->getStmtClass() == OMPMaskedTaskLoopSimdDirectiveClass56.0k
||
1544
62.0k
           
T->getStmtClass() == OMPMasterTaskLoopDirectiveClass55.9k
||
1545
62.0k
           
T->getStmtClass() == OMPMasterTaskLoopSimdDirectiveClass55.7k
||
1546
62.0k
           
T->getStmtClass() == OMPGenericLoopDirectiveClass55.4k
||
1547
62.0k
           
T->getStmtClass() == OMPTeamsGenericLoopDirectiveClass55.4k
||
1548
62.0k
           
T->getStmtClass() == OMPTargetTeamsGenericLoopDirectiveClass55.0k
||
1549
62.0k
           
T->getStmtClass() == OMPParallelGenericLoopDirectiveClass53.9k
||
1550
62.0k
           
T->getStmtClass() == OMPTargetParallelGenericLoopDirectiveClass53.8k
||
1551
62.0k
           
T->getStmtClass() == OMPParallelMaskedTaskLoopDirectiveClass52.8k
||
1552
62.0k
           
T->getStmtClass() == OMPParallelMaskedTaskLoopSimdDirectiveClass52.8k
||
1553
62.0k
           
T->getStmtClass() == OMPParallelMasterTaskLoopDirectiveClass52.7k
||
1554
62.0k
           
T->getStmtClass() == OMPParallelMasterTaskLoopSimdDirectiveClass52.6k
||
1555
62.0k
           
T->getStmtClass() == OMPDistributeDirectiveClass52.2k
||
1556
62.0k
           
T->getStmtClass() == OMPTargetParallelForDirectiveClass51.8k
||
1557
62.0k
           
T->getStmtClass() == OMPDistributeParallelForDirectiveClass50.0k
||
1558
62.0k
           
T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass47.4k
||
1559
62.0k
           
T->getStmtClass() == OMPDistributeSimdDirectiveClass44.3k
||
1560
62.0k
           
T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass43.2k
||
1561
62.0k
           
T->getStmtClass() == OMPTargetSimdDirectiveClass40.2k
||
1562
62.0k
           
T->getStmtClass() == OMPTeamsDistributeDirectiveClass37.5k
||
1563
62.0k
           
T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass36.9k
||
1564
62.0k
           T->getStmtClass() ==
1565
35.7k
               OMPTeamsDistributeParallelForSimdDirectiveClass ||
1566
62.0k
           
T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass31.7k
||
1567
62.0k
           T->getStmtClass() ==
1568
29.1k
               OMPTargetTeamsDistributeParallelForDirectiveClass ||
1569
62.0k
           T->getStmtClass() ==
1570
25.6k
               OMPTargetTeamsDistributeParallelForSimdDirectiveClass ||
1571
62.0k
           
T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass17.9k
||
1572
62.0k
           
T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass15.4k
;
1573
62.0k
  }
1574
};
1575
1576
/// This represents '#pragma omp simd' directive.
1577
///
1578
/// \code
1579
/// #pragma omp simd private(a,b) linear(i,j:s) reduction(+:c,d)
1580
/// \endcode
1581
/// In this example directive '#pragma omp simd' has clauses 'private'
1582
/// with the variables 'a' and 'b', 'linear' with variables 'i', 'j' and
1583
/// linear step 's', 'reduction' with operator '+' and variables 'c' and 'd'.
1584
///
1585
class OMPSimdDirective : public OMPLoopDirective {
1586
  friend class ASTStmtReader;
1587
  friend class OMPExecutableDirective;
1588
  /// Build directive with the given start and end location.
1589
  ///
1590
  /// \param StartLoc Starting location of the directive kind.
1591
  /// \param EndLoc Ending location of the directive.
1592
  /// \param CollapsedNum Number of collapsed nested loops.
1593
  ///
1594
  OMPSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1595
                   unsigned CollapsedNum)
1596
8.53k
      : OMPLoopDirective(OMPSimdDirectiveClass, llvm::omp::OMPD_simd, StartLoc,
1597
8.53k
                         EndLoc, CollapsedNum) {}
1598
1599
  /// Build an empty directive.
1600
  ///
1601
  /// \param CollapsedNum Number of collapsed nested loops.
1602
  ///
1603
  explicit OMPSimdDirective(unsigned CollapsedNum)
1604
222
      : OMPLoopDirective(OMPSimdDirectiveClass, llvm::omp::OMPD_simd,
1605
222
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
1606
1607
public:
1608
  /// Creates directive with a list of \a Clauses.
1609
  ///
1610
  /// \param C AST context.
1611
  /// \param StartLoc Starting location of the directive kind.
1612
  /// \param EndLoc Ending Location of the directive.
1613
  /// \param CollapsedNum Number of collapsed loops.
1614
  /// \param Clauses List of clauses.
1615
  /// \param AssociatedStmt Statement, associated with the directive.
1616
  /// \param Exprs Helper expressions for CodeGen.
1617
  ///
1618
  static OMPSimdDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1619
                                  SourceLocation EndLoc, unsigned CollapsedNum,
1620
                                  ArrayRef<OMPClause *> Clauses,
1621
                                  Stmt *AssociatedStmt,
1622
                                  const HelperExprs &Exprs,
1623
                                  OpenMPDirectiveKind ParamPrevMappedDirective);
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 OMPSimdDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1633
                                       unsigned CollapsedNum, EmptyShell);
1634
1635
3.40k
  static bool classof(const Stmt *T) {
1636
3.40k
    return T->getStmtClass() == OMPSimdDirectiveClass;
1637
3.40k
  }
1638
};
1639
1640
/// This represents '#pragma omp for' directive.
1641
///
1642
/// \code
1643
/// #pragma omp for private(a,b) reduction(+:c,d)
1644
/// \endcode
1645
/// In this example directive '#pragma omp for' has clauses 'private' with the
1646
/// variables 'a' and 'b' and 'reduction' with operator '+' and variables 'c'
1647
/// and 'd'.
1648
///
1649
class OMPForDirective : public OMPLoopDirective {
1650
  friend class ASTStmtReader;
1651
  friend class OMPExecutableDirective;
1652
  /// true if current directive has inner cancel directive.
1653
  bool HasCancel = false;
1654
1655
  /// Build directive with the given start and end location.
1656
  ///
1657
  /// \param StartLoc Starting location of the directive kind.
1658
  /// \param EndLoc Ending location of the directive.
1659
  /// \param CollapsedNum Number of collapsed nested loops.
1660
  ///
1661
  OMPForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1662
                  unsigned CollapsedNum)
1663
10.0k
      : OMPLoopDirective(OMPForDirectiveClass, llvm::omp::OMPD_for, StartLoc,
1664
10.0k
                         EndLoc, CollapsedNum) {}
1665
1666
  /// Build an empty directive.
1667
  ///
1668
  /// \param CollapsedNum Number of collapsed nested loops.
1669
  ///
1670
  explicit OMPForDirective(unsigned CollapsedNum)
1671
509
      : OMPLoopDirective(OMPForDirectiveClass, llvm::omp::OMPD_for,
1672
509
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
1673
1674
  /// Sets special task reduction descriptor.
1675
10.0k
  void setTaskReductionRefExpr(Expr *E) {
1676
10.0k
    Data->getChildren()[numLoopChildren(getLoopsNumber(),
1677
10.0k
                                        llvm::omp::OMPD_for)] = E;
1678
10.0k
  }
1679
1680
  /// Set cancel state.
1681
10.5k
  void setHasCancel(bool Has) { HasCancel = Has; }
1682
1683
public:
1684
  /// Creates directive with a list of \a Clauses.
1685
  ///
1686
  /// \param C AST context.
1687
  /// \param StartLoc Starting location of the directive kind.
1688
  /// \param EndLoc Ending Location of the directive.
1689
  /// \param CollapsedNum Number of collapsed loops.
1690
  /// \param Clauses List of clauses.
1691
  /// \param AssociatedStmt Statement, associated with the directive.
1692
  /// \param Exprs Helper expressions for CodeGen.
1693
  /// \param TaskRedRef Task reduction special reference expression to handle
1694
  /// taskgroup descriptor.
1695
  /// \param HasCancel true if current directive has inner cancel directive.
1696
  ///
1697
  static OMPForDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1698
                                 SourceLocation EndLoc, unsigned CollapsedNum,
1699
                                 ArrayRef<OMPClause *> Clauses,
1700
                                 Stmt *AssociatedStmt, const HelperExprs &Exprs,
1701
                                 Expr *TaskRedRef, bool HasCancel,
1702
                                 OpenMPDirectiveKind ParamPrevMappedDirective);
1703
1704
  /// Creates an empty directive with the place
1705
  /// for \a NumClauses clauses.
1706
  ///
1707
  /// \param C AST context.
1708
  /// \param CollapsedNum Number of collapsed nested loops.
1709
  /// \param NumClauses Number of clauses.
1710
  ///
1711
  static OMPForDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1712
                                      unsigned CollapsedNum, EmptyShell);
1713
1714
  /// Returns special task reduction reference expression.
1715
2
  Expr *getTaskReductionRefExpr() {
1716
2
    return cast_or_null<Expr>(Data->getChildren()[numLoopChildren(
1717
2
        getLoopsNumber(), llvm::omp::OMPD_for)]);
1718
2
  }
1719
2
  const Expr *getTaskReductionRefExpr() const {
1720
2
    return const_cast<OMPForDirective *>(this)->getTaskReductionRefExpr();
1721
2
  }
1722
1723
  /// Return true if current directive has inner cancel directive.
1724
1.51k
  bool hasCancel() const { return HasCancel; }
1725
1726
4.80k
  static bool classof(const Stmt *T) {
1727
4.80k
    return T->getStmtClass() == OMPForDirectiveClass;
1728
4.80k
  }
1729
};
1730
1731
/// This represents '#pragma omp for simd' directive.
1732
///
1733
/// \code
1734
/// #pragma omp for simd private(a,b) linear(i,j:s) reduction(+:c,d)
1735
/// \endcode
1736
/// In this example directive '#pragma omp for simd' has clauses 'private'
1737
/// with the variables 'a' and 'b', 'linear' with variables 'i', 'j' and
1738
/// linear step 's', 'reduction' with operator '+' and variables 'c' and 'd'.
1739
///
1740
class OMPForSimdDirective : public OMPLoopDirective {
1741
  friend class ASTStmtReader;
1742
  friend class OMPExecutableDirective;
1743
  /// Build directive with the given start and end location.
1744
  ///
1745
  /// \param StartLoc Starting location of the directive kind.
1746
  /// \param EndLoc Ending location of the directive.
1747
  /// \param CollapsedNum Number of collapsed nested loops.
1748
  ///
1749
  OMPForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1750
                      unsigned CollapsedNum)
1751
7.67k
      : OMPLoopDirective(OMPForSimdDirectiveClass, llvm::omp::OMPD_for_simd,
1752
7.67k
                         StartLoc, EndLoc, CollapsedNum) {}
1753
1754
  /// Build an empty directive.
1755
  ///
1756
  /// \param CollapsedNum Number of collapsed nested loops.
1757
  ///
1758
  explicit OMPForSimdDirective(unsigned CollapsedNum)
1759
157
      : OMPLoopDirective(OMPForSimdDirectiveClass, llvm::omp::OMPD_for_simd,
1760
157
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
1761
1762
public:
1763
  /// Creates directive with a list of \a Clauses.
1764
  ///
1765
  /// \param C AST context.
1766
  /// \param StartLoc Starting location of the directive kind.
1767
  /// \param EndLoc Ending Location of the directive.
1768
  /// \param CollapsedNum Number of collapsed loops.
1769
  /// \param Clauses List of clauses.
1770
  /// \param AssociatedStmt Statement, associated with the directive.
1771
  /// \param Exprs Helper expressions for CodeGen.
1772
  ///
1773
  static OMPForSimdDirective *
1774
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1775
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1776
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
1777
1778
  /// Creates an empty directive with the place
1779
  /// for \a NumClauses clauses.
1780
  ///
1781
  /// \param C AST context.
1782
  /// \param CollapsedNum Number of collapsed nested loops.
1783
  /// \param NumClauses Number of clauses.
1784
  ///
1785
  static OMPForSimdDirective *CreateEmpty(const ASTContext &C,
1786
                                          unsigned NumClauses,
1787
                                          unsigned CollapsedNum, EmptyShell);
1788
1789
3.17k
  static bool classof(const Stmt *T) {
1790
3.17k
    return T->getStmtClass() == OMPForSimdDirectiveClass;
1791
3.17k
  }
1792
};
1793
1794
/// This represents '#pragma omp sections' directive.
1795
///
1796
/// \code
1797
/// #pragma omp sections private(a,b) reduction(+:c,d)
1798
/// \endcode
1799
/// In this example directive '#pragma omp sections' has clauses 'private' with
1800
/// the variables 'a' and 'b' and 'reduction' with operator '+' and variables
1801
/// 'c' and 'd'.
1802
///
1803
class OMPSectionsDirective : public OMPExecutableDirective {
1804
  friend class ASTStmtReader;
1805
  friend class OMPExecutableDirective;
1806
1807
  /// true if current directive has inner cancel directive.
1808
  bool HasCancel = false;
1809
1810
  /// Build directive with the given start and end location.
1811
  ///
1812
  /// \param StartLoc Starting location of the directive kind.
1813
  /// \param EndLoc Ending location of the directive.
1814
  ///
1815
  OMPSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1816
5.60k
      : OMPExecutableDirective(OMPSectionsDirectiveClass,
1817
5.60k
                               llvm::omp::OMPD_sections, StartLoc, EndLoc) {}
1818
1819
  /// Build an empty directive.
1820
  ///
1821
  explicit OMPSectionsDirective()
1822
58
      : OMPExecutableDirective(OMPSectionsDirectiveClass,
1823
58
                               llvm::omp::OMPD_sections, SourceLocation(),
1824
58
                               SourceLocation()) {}
1825
1826
  /// Sets special task reduction descriptor.
1827
5.60k
  void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
1828
1829
  /// Set cancel state.
1830
5.66k
  void setHasCancel(bool Has) { HasCancel = Has; }
1831
1832
public:
1833
  /// Creates directive with a list of \a Clauses.
1834
  ///
1835
  /// \param C AST context.
1836
  /// \param StartLoc Starting location of the directive kind.
1837
  /// \param EndLoc Ending Location of the directive.
1838
  /// \param Clauses List of clauses.
1839
  /// \param AssociatedStmt Statement, associated with the directive.
1840
  /// \param TaskRedRef Task reduction special reference expression to handle
1841
  /// taskgroup descriptor.
1842
  /// \param HasCancel true if current directive has inner directive.
1843
  ///
1844
  static OMPSectionsDirective *
1845
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1846
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
1847
         bool HasCancel);
1848
1849
  /// Creates an empty directive with the place for \a NumClauses
1850
  /// clauses.
1851
  ///
1852
  /// \param C AST context.
1853
  /// \param NumClauses Number of clauses.
1854
  ///
1855
  static OMPSectionsDirective *CreateEmpty(const ASTContext &C,
1856
                                           unsigned NumClauses, EmptyShell);
1857
1858
  /// Returns special task reduction reference expression.
1859
2
  Expr *getTaskReductionRefExpr() {
1860
2
    return cast_or_null<Expr>(Data->getChildren()[0]);
1861
2
  }
1862
2
  const Expr *getTaskReductionRefExpr() const {
1863
2
    return const_cast<OMPSectionsDirective *>(this)->getTaskReductionRefExpr();
1864
2
  }
1865
1866
  /// Return true if current directive has inner cancel directive.
1867
120
  bool hasCancel() const { return HasCancel; }
1868
1869
2.58k
  static bool classof(const Stmt *T) {
1870
2.58k
    return T->getStmtClass() == OMPSectionsDirectiveClass;
1871
2.58k
  }
1872
};
1873
1874
/// This represents '#pragma omp section' directive.
1875
///
1876
/// \code
1877
/// #pragma omp section
1878
/// \endcode
1879
///
1880
class OMPSectionDirective : public OMPExecutableDirective {
1881
  friend class ASTStmtReader;
1882
  friend class OMPExecutableDirective;
1883
1884
  /// true if current directive has inner cancel directive.
1885
  bool HasCancel = false;
1886
1887
  /// Build directive with the given start and end location.
1888
  ///
1889
  /// \param StartLoc Starting location of the directive kind.
1890
  /// \param EndLoc Ending location of the directive.
1891
  ///
1892
  OMPSectionDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1893
1.23k
      : OMPExecutableDirective(OMPSectionDirectiveClass,
1894
1.23k
                               llvm::omp::OMPD_section, StartLoc, EndLoc) {}
1895
1896
  /// Build an empty directive.
1897
  ///
1898
  explicit OMPSectionDirective()
1899
50
      : OMPExecutableDirective(OMPSectionDirectiveClass,
1900
50
                               llvm::omp::OMPD_section, SourceLocation(),
1901
50
                               SourceLocation()) {}
1902
1903
public:
1904
  /// Creates directive.
1905
  ///
1906
  /// \param C AST context.
1907
  /// \param StartLoc Starting location of the directive kind.
1908
  /// \param EndLoc Ending Location of the directive.
1909
  /// \param AssociatedStmt Statement, associated with the directive.
1910
  /// \param HasCancel true if current directive has inner directive.
1911
  ///
1912
  static OMPSectionDirective *Create(const ASTContext &C,
1913
                                     SourceLocation StartLoc,
1914
                                     SourceLocation EndLoc,
1915
                                     Stmt *AssociatedStmt, bool HasCancel);
1916
1917
  /// Creates an empty directive.
1918
  ///
1919
  /// \param C AST context.
1920
  ///
1921
  static OMPSectionDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1922
1923
  /// Set cancel state.
1924
1.45k
  void setHasCancel(bool Has) { HasCancel = Has; }
1925
1926
  /// Return true if current directive has inner cancel directive.
1927
50
  bool hasCancel() const { return HasCancel; }
1928
1929
795
  static bool classof(const Stmt *T) {
1930
795
    return T->getStmtClass() == OMPSectionDirectiveClass;
1931
795
  }
1932
};
1933
1934
/// This represents '#pragma omp scope' directive.
1935
/// \code
1936
/// #pragma omp scope private(a,b) nowait
1937
/// \endcode
1938
/// In this example directive '#pragma omp scope' has clauses 'private' with
1939
/// the variables 'a' and 'b' and nowait.
1940
///
1941
class OMPScopeDirective final : public OMPExecutableDirective {
1942
  friend class ASTStmtReader;
1943
  friend class OMPExecutableDirective;
1944
1945
  /// Build directive with the given start and end location.
1946
  ///
1947
  /// \param StartLoc Starting location of the directive kind.
1948
  /// \param EndLoc Ending location of the directive.
1949
  ///
1950
  OMPScopeDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1951
1.14k
      : OMPExecutableDirective(OMPScopeDirectiveClass, llvm::omp::OMPD_scope,
1952
1.14k
                               StartLoc, EndLoc) {}
1953
1954
  /// Build an empty directive.
1955
  ///
1956
  explicit OMPScopeDirective()
1957
4
      : OMPExecutableDirective(OMPScopeDirectiveClass, llvm::omp::OMPD_scope,
1958
4
                               SourceLocation(), SourceLocation()) {}
1959
1960
public:
1961
  /// Creates directive.
1962
  ///
1963
  /// \param C AST context.
1964
  /// \param StartLoc Starting location of the directive kind.
1965
  /// \param EndLoc Ending Location of the directive.
1966
  /// \param AssociatedStmt Statement, associated with the directive.
1967
  ///
1968
  static OMPScopeDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1969
                                   SourceLocation EndLoc,
1970
                                   ArrayRef<OMPClause *> Clauses,
1971
                                   Stmt *AssociatedStmt);
1972
1973
  /// Creates an empty directive.
1974
  ///
1975
  /// \param C AST context.
1976
  ///
1977
  static OMPScopeDirective *CreateEmpty(const ASTContext &C,
1978
                                        unsigned NumClauses, EmptyShell);
1979
1980
382
  static bool classof(const Stmt *T) {
1981
382
    return T->getStmtClass() == OMPScopeDirectiveClass;
1982
382
  }
1983
};
1984
1985
/// This represents '#pragma omp single' directive.
1986
///
1987
/// \code
1988
/// #pragma omp single private(a,b) copyprivate(c,d)
1989
/// \endcode
1990
/// In this example directive '#pragma omp single' has clauses 'private' with
1991
/// the variables 'a' and 'b' and 'copyprivate' with variables 'c' and 'd'.
1992
///
1993
class OMPSingleDirective : public OMPExecutableDirective {
1994
  friend class ASTStmtReader;
1995
  friend class OMPExecutableDirective;
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
  ///
2001
  OMPSingleDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2002
2.49k
      : OMPExecutableDirective(OMPSingleDirectiveClass, llvm::omp::OMPD_single,
2003
2.49k
                               StartLoc, EndLoc) {}
2004
2005
  /// Build an empty directive.
2006
  ///
2007
  explicit OMPSingleDirective()
2008
46
      : OMPExecutableDirective(OMPSingleDirectiveClass, llvm::omp::OMPD_single,
2009
46
                               SourceLocation(), SourceLocation()) {}
2010
2011
public:
2012
  /// Creates directive with a list of \a Clauses.
2013
  ///
2014
  /// \param C AST context.
2015
  /// \param StartLoc Starting location of the directive kind.
2016
  /// \param EndLoc Ending Location of the directive.
2017
  /// \param Clauses List of clauses.
2018
  /// \param AssociatedStmt Statement, associated with the directive.
2019
  ///
2020
  static OMPSingleDirective *
2021
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2022
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2023
2024
  /// Creates an empty directive with the place for \a NumClauses
2025
  /// clauses.
2026
  ///
2027
  /// \param C AST context.
2028
  /// \param NumClauses Number of clauses.
2029
  ///
2030
  static OMPSingleDirective *CreateEmpty(const ASTContext &C,
2031
                                         unsigned NumClauses, EmptyShell);
2032
2033
845
  static bool classof(const Stmt *T) {
2034
845
    return T->getStmtClass() == OMPSingleDirectiveClass;
2035
845
  }
2036
};
2037
2038
/// This represents '#pragma omp master' directive.
2039
///
2040
/// \code
2041
/// #pragma omp master
2042
/// \endcode
2043
///
2044
class OMPMasterDirective : public OMPExecutableDirective {
2045
  friend class ASTStmtReader;
2046
  friend class OMPExecutableDirective;
2047
  /// Build directive with the given start and end location.
2048
  ///
2049
  /// \param StartLoc Starting location of the directive kind.
2050
  /// \param EndLoc Ending location of the directive.
2051
  ///
2052
  OMPMasterDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2053
1.67k
      : OMPExecutableDirective(OMPMasterDirectiveClass, llvm::omp::OMPD_master,
2054
1.67k
                               StartLoc, EndLoc) {}
2055
2056
  /// Build an empty directive.
2057
  ///
2058
  explicit OMPMasterDirective()
2059
17
      : OMPExecutableDirective(OMPMasterDirectiveClass, llvm::omp::OMPD_master,
2060
17
                               SourceLocation(), SourceLocation()) {}
2061
2062
public:
2063
  /// Creates directive.
2064
  ///
2065
  /// \param C AST context.
2066
  /// \param StartLoc Starting location of the directive kind.
2067
  /// \param EndLoc Ending Location of the directive.
2068
  /// \param AssociatedStmt Statement, associated with the directive.
2069
  ///
2070
  static OMPMasterDirective *Create(const ASTContext &C,
2071
                                    SourceLocation StartLoc,
2072
                                    SourceLocation EndLoc,
2073
                                    Stmt *AssociatedStmt);
2074
2075
  /// Creates an empty directive.
2076
  ///
2077
  /// \param C AST context.
2078
  ///
2079
  static OMPMasterDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2080
2081
574
  static bool classof(const Stmt *T) {
2082
574
    return T->getStmtClass() == OMPMasterDirectiveClass;
2083
574
  }
2084
};
2085
2086
/// This represents '#pragma omp critical' directive.
2087
///
2088
/// \code
2089
/// #pragma omp critical
2090
/// \endcode
2091
///
2092
class OMPCriticalDirective : public OMPExecutableDirective {
2093
  friend class ASTStmtReader;
2094
  friend class OMPExecutableDirective;
2095
  /// Name of the directive.
2096
  DeclarationNameInfo DirName;
2097
  /// Build directive with the given start and end location.
2098
  ///
2099
  /// \param Name Name of the directive.
2100
  /// \param StartLoc Starting location of the directive kind.
2101
  /// \param EndLoc Ending location of the directive.
2102
  ///
2103
  OMPCriticalDirective(const DeclarationNameInfo &Name, SourceLocation StartLoc,
2104
                       SourceLocation EndLoc)
2105
2.38k
      : OMPExecutableDirective(OMPCriticalDirectiveClass,
2106
2.38k
                               llvm::omp::OMPD_critical, StartLoc, EndLoc),
2107
2.38k
        DirName(Name) {}
2108
2109
  /// Build an empty directive.
2110
  ///
2111
  explicit OMPCriticalDirective()
2112
78
      : OMPExecutableDirective(OMPCriticalDirectiveClass,
2113
78
                               llvm::omp::OMPD_critical, SourceLocation(),
2114
78
                               SourceLocation()) {}
2115
2116
  /// Set name of the directive.
2117
  ///
2118
  /// \param Name Name of the directive.
2119
  ///
2120
0
  void setDirectiveName(const DeclarationNameInfo &Name) { DirName = Name; }
2121
2122
public:
2123
  /// Creates directive.
2124
  ///
2125
  /// \param C AST context.
2126
  /// \param Name Name of the directive.
2127
  /// \param StartLoc Starting location of the directive kind.
2128
  /// \param EndLoc Ending Location of the directive.
2129
  /// \param Clauses List of clauses.
2130
  /// \param AssociatedStmt Statement, associated with the directive.
2131
  ///
2132
  static OMPCriticalDirective *
2133
  Create(const ASTContext &C, const DeclarationNameInfo &Name,
2134
         SourceLocation StartLoc, SourceLocation EndLoc,
2135
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2136
2137
  /// Creates an empty directive.
2138
  ///
2139
  /// \param C AST context.
2140
  /// \param NumClauses Number of clauses.
2141
  ///
2142
  static OMPCriticalDirective *CreateEmpty(const ASTContext &C,
2143
                                           unsigned NumClauses, EmptyShell);
2144
2145
  /// Return name of the directive.
2146
  ///
2147
1.90k
  DeclarationNameInfo getDirectiveName() const { return DirName; }
2148
2149
1.62k
  static bool classof(const Stmt *T) {
2150
1.62k
    return T->getStmtClass() == OMPCriticalDirectiveClass;
2151
1.62k
  }
2152
};
2153
2154
/// This represents '#pragma omp parallel for' directive.
2155
///
2156
/// \code
2157
/// #pragma omp parallel for private(a,b) reduction(+:c,d)
2158
/// \endcode
2159
/// In this example directive '#pragma omp parallel for' has clauses 'private'
2160
/// with the variables 'a' and 'b' and 'reduction' with operator '+' and
2161
/// variables 'c' and 'd'.
2162
///
2163
class OMPParallelForDirective : public OMPLoopDirective {
2164
  friend class ASTStmtReader;
2165
  friend class OMPExecutableDirective;
2166
2167
  /// true if current region has inner cancel directive.
2168
  bool HasCancel = false;
2169
2170
  /// Build directive with the given start and end location.
2171
  ///
2172
  /// \param StartLoc Starting location of the directive kind.
2173
  /// \param EndLoc Ending location of the directive.
2174
  /// \param CollapsedNum Number of collapsed nested loops.
2175
  ///
2176
  OMPParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2177
                          unsigned CollapsedNum)
2178
7.40k
      : OMPLoopDirective(OMPParallelForDirectiveClass,
2179
7.40k
                         llvm::omp::OMPD_parallel_for, StartLoc, EndLoc,
2180
7.40k
                         CollapsedNum) {}
2181
2182
  /// Build an empty directive.
2183
  ///
2184
  /// \param CollapsedNum Number of collapsed nested loops.
2185
  ///
2186
  explicit OMPParallelForDirective(unsigned CollapsedNum)
2187
139
      : OMPLoopDirective(OMPParallelForDirectiveClass,
2188
139
                         llvm::omp::OMPD_parallel_for, SourceLocation(),
2189
139
                         SourceLocation(), CollapsedNum) {}
2190
2191
  /// Sets special task reduction descriptor.
2192
7.40k
  void setTaskReductionRefExpr(Expr *E) {
2193
7.40k
    Data->getChildren()[numLoopChildren(getLoopsNumber(),
2194
7.40k
                                        llvm::omp::OMPD_parallel_for)] = E;
2195
7.40k
  }
2196
2197
  /// Set cancel state.
2198
7.53k
  void setHasCancel(bool Has) { HasCancel = Has; }
2199
2200
public:
2201
  /// Creates directive with a list of \a Clauses.
2202
  ///
2203
  /// \param C AST context.
2204
  /// \param StartLoc Starting location of the directive kind.
2205
  /// \param EndLoc Ending Location of the directive.
2206
  /// \param CollapsedNum Number of collapsed loops.
2207
  /// \param Clauses List of clauses.
2208
  /// \param AssociatedStmt Statement, associated with the directive.
2209
  /// \param Exprs Helper expressions for CodeGen.
2210
  /// \param TaskRedRef Task reduction special reference expression to handle
2211
  /// taskgroup descriptor.
2212
  /// \param HasCancel true if current directive has inner cancel directive.
2213
  ///
2214
  static OMPParallelForDirective *
2215
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2216
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2217
         Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
2218
         bool HasCancel);
2219
2220
  /// Creates an empty directive with the place
2221
  /// for \a NumClauses clauses.
2222
  ///
2223
  /// \param C AST context.
2224
  /// \param CollapsedNum Number of collapsed nested loops.
2225
  /// \param NumClauses Number of clauses.
2226
  ///
2227
  static OMPParallelForDirective *CreateEmpty(const ASTContext &C,
2228
                                              unsigned NumClauses,
2229
                                              unsigned CollapsedNum,
2230
                                              EmptyShell);
2231
2232
  /// Returns special task reduction reference expression.
2233
2
  Expr *getTaskReductionRefExpr() {
2234
2
    return cast_or_null<Expr>(Data->getChildren()[numLoopChildren(
2235
2
        getLoopsNumber(), llvm::omp::OMPD_parallel_for)]);
2236
2
  }
2237
2
  const Expr *getTaskReductionRefExpr() const {
2238
2
    return const_cast<OMPParallelForDirective *>(this)
2239
2
        ->getTaskReductionRefExpr();
2240
2
  }
2241
2242
  /// Return true if current directive has inner cancel directive.
2243
619
  bool hasCancel() const { return HasCancel; }
2244
2245
13.6k
  static bool classof(const Stmt *T) {
2246
13.6k
    return T->getStmtClass() == OMPParallelForDirectiveClass;
2247
13.6k
  }
2248
};
2249
2250
/// This represents '#pragma omp parallel for simd' directive.
2251
///
2252
/// \code
2253
/// #pragma omp parallel for simd private(a,b) linear(i,j:s) reduction(+:c,d)
2254
/// \endcode
2255
/// In this example directive '#pragma omp parallel for simd' has clauses
2256
/// 'private' with the variables 'a' and 'b', 'linear' with variables 'i', 'j'
2257
/// and linear step 's', 'reduction' with operator '+' and variables 'c' and
2258
/// 'd'.
2259
///
2260
class OMPParallelForSimdDirective : public OMPLoopDirective {
2261
  friend class ASTStmtReader;
2262
  friend class OMPExecutableDirective;
2263
  /// Build directive with the given start and end location.
2264
  ///
2265
  /// \param StartLoc Starting location of the directive kind.
2266
  /// \param EndLoc Ending location of the directive.
2267
  /// \param CollapsedNum Number of collapsed nested loops.
2268
  ///
2269
  OMPParallelForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2270
                              unsigned CollapsedNum)
2271
8.19k
      : OMPLoopDirective(OMPParallelForSimdDirectiveClass,
2272
8.19k
                         llvm::omp::OMPD_parallel_for_simd, StartLoc, EndLoc,
2273
8.19k
                         CollapsedNum) {}
2274
2275
  /// Build an empty directive.
2276
  ///
2277
  /// \param CollapsedNum Number of collapsed nested loops.
2278
  ///
2279
  explicit OMPParallelForSimdDirective(unsigned CollapsedNum)
2280
144
      : OMPLoopDirective(OMPParallelForSimdDirectiveClass,
2281
144
                         llvm::omp::OMPD_parallel_for_simd, SourceLocation(),
2282
144
                         SourceLocation(), CollapsedNum) {}
2283
2284
public:
2285
  /// Creates directive with a list of \a Clauses.
2286
  ///
2287
  /// \param C AST context.
2288
  /// \param StartLoc Starting location of the directive kind.
2289
  /// \param EndLoc Ending Location of the directive.
2290
  /// \param CollapsedNum Number of collapsed loops.
2291
  /// \param Clauses List of clauses.
2292
  /// \param AssociatedStmt Statement, associated with the directive.
2293
  /// \param Exprs Helper expressions for CodeGen.
2294
  ///
2295
  static OMPParallelForSimdDirective *
2296
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2297
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2298
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
2299
2300
  /// Creates an empty directive with the place
2301
  /// for \a NumClauses clauses.
2302
  ///
2303
  /// \param C AST context.
2304
  /// \param CollapsedNum Number of collapsed nested loops.
2305
  /// \param NumClauses Number of clauses.
2306
  ///
2307
  static OMPParallelForSimdDirective *CreateEmpty(const ASTContext &C,
2308
                                                  unsigned NumClauses,
2309
                                                  unsigned CollapsedNum,
2310
                                                  EmptyShell);
2311
2312
3.20k
  static bool classof(const Stmt *T) {
2313
3.20k
    return T->getStmtClass() == OMPParallelForSimdDirectiveClass;
2314
3.20k
  }
2315
};
2316
2317
/// This represents '#pragma omp parallel master' directive.
2318
///
2319
/// \code
2320
/// #pragma omp parallel master private(a,b)
2321
/// \endcode
2322
/// In this example directive '#pragma omp parallel master' has clauses
2323
/// 'private' with the variables 'a' and 'b'
2324
///
2325
class OMPParallelMasterDirective : public OMPExecutableDirective {
2326
  friend class ASTStmtReader;
2327
  friend class OMPExecutableDirective;
2328
2329
  OMPParallelMasterDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2330
5.18k
      : OMPExecutableDirective(OMPParallelMasterDirectiveClass,
2331
5.18k
                               llvm::omp::OMPD_parallel_master, StartLoc,
2332
5.18k
                               EndLoc) {}
2333
2334
  explicit OMPParallelMasterDirective()
2335
63
      : OMPExecutableDirective(OMPParallelMasterDirectiveClass,
2336
63
                               llvm::omp::OMPD_parallel_master,
2337
63
                               SourceLocation(), SourceLocation()) {}
2338
2339
  /// Sets special task reduction descriptor.
2340
5.18k
  void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
2341
2342
public:
2343
  /// Creates directive with a list of \a Clauses.
2344
  ///
2345
  /// \param C AST context.
2346
  /// \param StartLoc Starting location of the directive kind.
2347
  /// \param EndLoc Ending Location of the directive.
2348
  /// \param Clauses List of clauses.
2349
  /// \param AssociatedStmt Statement, associated with the directive.
2350
  /// \param TaskRedRef Task reduction special reference expression to handle
2351
  /// taskgroup descriptor.
2352
  ///
2353
  static OMPParallelMasterDirective *
2354
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2355
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef);
2356
2357
  /// Creates an empty directive with the place for \a NumClauses
2358
  /// clauses.
2359
  ///
2360
  /// \param C AST context.
2361
  /// \param NumClauses Number of clauses.
2362
  ///
2363
  static OMPParallelMasterDirective *
2364
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2365
2366
  /// Returns special task reduction reference expression.
2367
2
  Expr *getTaskReductionRefExpr() {
2368
2
    return cast_or_null<Expr>(Data->getChildren()[0]);
2369
2
  }
2370
2
  const Expr *getTaskReductionRefExpr() const {
2371
2
    return const_cast<OMPParallelMasterDirective *>(this)
2372
2
        ->getTaskReductionRefExpr();
2373
2
  }
2374
2375
2.55k
  static bool classof(const Stmt *T) {
2376
2.55k
    return T->getStmtClass() == OMPParallelMasterDirectiveClass;
2377
2.55k
  }
2378
};
2379
2380
/// This represents '#pragma omp parallel masked' directive.
2381
///
2382
/// \code
2383
/// #pragma omp parallel masked filter(tid)
2384
/// \endcode
2385
/// In this example directive '#pragma omp parallel masked' has a clause
2386
/// 'filter' with the variable tid
2387
///
2388
class OMPParallelMaskedDirective final : public OMPExecutableDirective {
2389
  friend class ASTStmtReader;
2390
  friend class OMPExecutableDirective;
2391
2392
  OMPParallelMaskedDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2393
3.74k
      : OMPExecutableDirective(OMPParallelMaskedDirectiveClass,
2394
3.74k
                               llvm::omp::OMPD_parallel_masked, StartLoc,
2395
3.74k
                               EndLoc) {}
2396
2397
  explicit OMPParallelMaskedDirective()
2398
44
      : OMPExecutableDirective(OMPParallelMaskedDirectiveClass,
2399
44
                               llvm::omp::OMPD_parallel_masked,
2400
44
                               SourceLocation(), SourceLocation()) {}
2401
2402
  /// Sets special task reduction descriptor.
2403
3.74k
  void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
2404
2405
public:
2406
  /// Creates directive with a list of \a Clauses.
2407
  ///
2408
  /// \param C AST context.
2409
  /// \param StartLoc Starting location of the directive kind.
2410
  /// \param EndLoc Ending Location of the directive.
2411
  /// \param Clauses List of clauses.
2412
  /// \param AssociatedStmt Statement, associated with the directive.
2413
  /// \param TaskRedRef Task reduction special reference expression to handle
2414
  /// taskgroup descriptor.
2415
  ///
2416
  static OMPParallelMaskedDirective *
2417
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2418
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef);
2419
2420
  /// Creates an empty directive with the place for \a NumClauses
2421
  /// clauses.
2422
  ///
2423
  /// \param C AST context.
2424
  /// \param NumClauses Number of clauses.
2425
  ///
2426
  static OMPParallelMaskedDirective *
2427
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2428
2429
  /// Returns special task reduction reference expression.
2430
0
  Expr *getTaskReductionRefExpr() {
2431
0
    return cast_or_null<Expr>(Data->getChildren()[0]);
2432
0
  }
2433
0
  const Expr *getTaskReductionRefExpr() const {
2434
0
    return const_cast<OMPParallelMaskedDirective *>(this)
2435
0
        ->getTaskReductionRefExpr();
2436
0
  }
2437
2438
1.85k
  static bool classof(const Stmt *T) {
2439
1.85k
    return T->getStmtClass() == OMPParallelMaskedDirectiveClass;
2440
1.85k
  }
2441
};
2442
2443
/// This represents '#pragma omp parallel sections' directive.
2444
///
2445
/// \code
2446
/// #pragma omp parallel sections private(a,b) reduction(+:c,d)
2447
/// \endcode
2448
/// In this example directive '#pragma omp parallel sections' has clauses
2449
/// 'private' with the variables 'a' and 'b' and 'reduction' with operator '+'
2450
/// and variables 'c' and 'd'.
2451
///
2452
class OMPParallelSectionsDirective : public OMPExecutableDirective {
2453
  friend class ASTStmtReader;
2454
  friend class OMPExecutableDirective;
2455
2456
  /// true if current directive has inner cancel directive.
2457
  bool HasCancel = false;
2458
2459
  /// Build directive with the given start and end location.
2460
  ///
2461
  /// \param StartLoc Starting location of the directive kind.
2462
  /// \param EndLoc Ending location of the directive.
2463
  ///
2464
  OMPParallelSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2465
5.14k
      : OMPExecutableDirective(OMPParallelSectionsDirectiveClass,
2466
5.14k
                               llvm::omp::OMPD_parallel_sections, StartLoc,
2467
5.14k
                               EndLoc) {}
2468
2469
  /// Build an empty directive.
2470
  ///
2471
  explicit OMPParallelSectionsDirective()
2472
32
      : OMPExecutableDirective(OMPParallelSectionsDirectiveClass,
2473
32
                               llvm::omp::OMPD_parallel_sections,
2474
32
                               SourceLocation(), SourceLocation()) {}
2475
2476
  /// Sets special task reduction descriptor.
2477
5.14k
  void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
2478
2479
  /// Set cancel state.
2480
5.17k
  void setHasCancel(bool Has) { HasCancel = Has; }
2481
2482
public:
2483
  /// Creates directive with a list of \a Clauses.
2484
  ///
2485
  /// \param C AST context.
2486
  /// \param StartLoc Starting location of the directive kind.
2487
  /// \param EndLoc Ending Location of the directive.
2488
  /// \param Clauses List of clauses.
2489
  /// \param AssociatedStmt Statement, associated with the directive.
2490
  /// \param TaskRedRef Task reduction special reference expression to handle
2491
  /// taskgroup descriptor.
2492
  /// \param HasCancel true if current directive has inner cancel directive.
2493
  ///
2494
  static OMPParallelSectionsDirective *
2495
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2496
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
2497
         bool HasCancel);
2498
2499
  /// Creates an empty directive with the place for \a NumClauses
2500
  /// clauses.
2501
  ///
2502
  /// \param C AST context.
2503
  /// \param NumClauses Number of clauses.
2504
  ///
2505
  static OMPParallelSectionsDirective *
2506
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2507
2508
  /// Returns special task reduction reference expression.
2509
2
  Expr *getTaskReductionRefExpr() {
2510
2
    return cast_or_null<Expr>(Data->getChildren()[0]);
2511
2
  }
2512
2
  const Expr *getTaskReductionRefExpr() const {
2513
2
    return const_cast<OMPParallelSectionsDirective *>(this)
2514
2
        ->getTaskReductionRefExpr();
2515
2
  }
2516
2517
  /// Return true if current directive has inner cancel directive.
2518
86
  bool hasCancel() const { return HasCancel; }
2519
2520
12.7k
  static bool classof(const Stmt *T) {
2521
12.7k
    return T->getStmtClass() == OMPParallelSectionsDirectiveClass;
2522
12.7k
  }
2523
};
2524
2525
/// This represents '#pragma omp task' directive.
2526
///
2527
/// \code
2528
/// #pragma omp task private(a,b) final(d)
2529
/// \endcode
2530
/// In this example directive '#pragma omp task' has clauses 'private' with the
2531
/// variables 'a' and 'b' and 'final' with condition 'd'.
2532
///
2533
class OMPTaskDirective : public OMPExecutableDirective {
2534
  friend class ASTStmtReader;
2535
  friend class OMPExecutableDirective;
2536
  /// true if this directive has inner cancel directive.
2537
  bool HasCancel = false;
2538
2539
  /// Build directive with the given start and end location.
2540
  ///
2541
  /// \param StartLoc Starting location of the directive kind.
2542
  /// \param EndLoc Ending location of the directive.
2543
  ///
2544
  OMPTaskDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2545
5.13k
      : OMPExecutableDirective(OMPTaskDirectiveClass, llvm::omp::OMPD_task,
2546
5.13k
                               StartLoc, EndLoc) {}
2547
2548
  /// Build an empty directive.
2549
  ///
2550
  explicit OMPTaskDirective()
2551
257
      : OMPExecutableDirective(OMPTaskDirectiveClass, llvm::omp::OMPD_task,
2552
257
                               SourceLocation(), SourceLocation()) {}
2553
2554
  /// Set cancel state.
2555
5.39k
  void setHasCancel(bool Has) { HasCancel = Has; }
2556
2557
public:
2558
  /// Creates directive with a list of \a Clauses.
2559
  ///
2560
  /// \param C AST context.
2561
  /// \param StartLoc Starting location of the directive kind.
2562
  /// \param EndLoc Ending Location of the directive.
2563
  /// \param Clauses List of clauses.
2564
  /// \param AssociatedStmt Statement, associated with the directive.
2565
  /// \param HasCancel true, if current directive has inner cancel directive.
2566
  ///
2567
  static OMPTaskDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2568
                                  SourceLocation EndLoc,
2569
                                  ArrayRef<OMPClause *> Clauses,
2570
                                  Stmt *AssociatedStmt, bool HasCancel);
2571
2572
  /// Creates an empty directive with the place for \a NumClauses
2573
  /// clauses.
2574
  ///
2575
  /// \param C AST context.
2576
  /// \param NumClauses Number of clauses.
2577
  ///
2578
  static OMPTaskDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
2579
                                       EmptyShell);
2580
2581
  /// Return true if current directive has inner cancel directive.
2582
539
  bool hasCancel() const { return HasCancel; }
2583
2584
3.13k
  static bool classof(const Stmt *T) {
2585
3.13k
    return T->getStmtClass() == OMPTaskDirectiveClass;
2586
3.13k
  }
2587
};
2588
2589
/// This represents '#pragma omp taskyield' directive.
2590
///
2591
/// \code
2592
/// #pragma omp taskyield
2593
/// \endcode
2594
///
2595
class OMPTaskyieldDirective : public OMPExecutableDirective {
2596
  friend class ASTStmtReader;
2597
  friend class OMPExecutableDirective;
2598
  /// Build directive with the given start and end location.
2599
  ///
2600
  /// \param StartLoc Starting location of the directive kind.
2601
  /// \param EndLoc Ending location of the directive.
2602
  ///
2603
  OMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2604
855
      : OMPExecutableDirective(OMPTaskyieldDirectiveClass,
2605
855
                               llvm::omp::OMPD_taskyield, StartLoc, EndLoc) {}
2606
2607
  /// Build an empty directive.
2608
  ///
2609
  explicit OMPTaskyieldDirective()
2610
16
      : OMPExecutableDirective(OMPTaskyieldDirectiveClass,
2611
16
                               llvm::omp::OMPD_taskyield, SourceLocation(),
2612
16
                               SourceLocation()) {}
2613
2614
public:
2615
  /// Creates directive.
2616
  ///
2617
  /// \param C AST context.
2618
  /// \param StartLoc Starting location of the directive kind.
2619
  /// \param EndLoc Ending Location of the directive.
2620
  ///
2621
  static OMPTaskyieldDirective *
2622
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
2623
2624
  /// Creates an empty directive.
2625
  ///
2626
  /// \param C AST context.
2627
  ///
2628
  static OMPTaskyieldDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2629
2630
5.14k
  static bool classof(const Stmt *T) {
2631
5.14k
    return T->getStmtClass() == OMPTaskyieldDirectiveClass;
2632
5.14k
  }
2633
};
2634
2635
/// This represents '#pragma omp barrier' directive.
2636
///
2637
/// \code
2638
/// #pragma omp barrier
2639
/// \endcode
2640
///
2641
class OMPBarrierDirective : public OMPExecutableDirective {
2642
  friend class ASTStmtReader;
2643
  friend class OMPExecutableDirective;
2644
  /// Build directive with the given start and end location.
2645
  ///
2646
  /// \param StartLoc Starting location of the directive kind.
2647
  /// \param EndLoc Ending location of the directive.
2648
  ///
2649
  OMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2650
443
      : OMPExecutableDirective(OMPBarrierDirectiveClass,
2651
443
                               llvm::omp::OMPD_barrier, StartLoc, EndLoc) {}
2652
2653
  /// Build an empty directive.
2654
  ///
2655
  explicit OMPBarrierDirective()
2656
30
      : OMPExecutableDirective(OMPBarrierDirectiveClass,
2657
30
                               llvm::omp::OMPD_barrier, SourceLocation(),
2658
30
                               SourceLocation()) {}
2659
2660
public:
2661
  /// Creates directive.
2662
  ///
2663
  /// \param C AST context.
2664
  /// \param StartLoc Starting location of the directive kind.
2665
  /// \param EndLoc Ending Location of the directive.
2666
  ///
2667
  static OMPBarrierDirective *
2668
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
2669
2670
  /// Creates an empty directive.
2671
  ///
2672
  /// \param C AST context.
2673
  ///
2674
  static OMPBarrierDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2675
2676
5.03k
  static bool classof(const Stmt *T) {
2677
5.03k
    return T->getStmtClass() == OMPBarrierDirectiveClass;
2678
5.03k
  }
2679
};
2680
2681
/// This represents '#pragma omp taskwait' directive.
2682
///
2683
/// \code
2684
/// #pragma omp taskwait
2685
/// \endcode
2686
///
2687
class OMPTaskwaitDirective : public OMPExecutableDirective {
2688
  friend class ASTStmtReader;
2689
  friend class OMPExecutableDirective;
2690
  /// Build directive with the given start and end location.
2691
  ///
2692
  /// \param StartLoc Starting location of the directive kind.
2693
  /// \param EndLoc Ending location of the directive.
2694
  ///
2695
  OMPTaskwaitDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2696
1.03k
      : OMPExecutableDirective(OMPTaskwaitDirectiveClass,
2697
1.03k
                               llvm::omp::OMPD_taskwait, StartLoc, EndLoc) {}
2698
2699
  /// Build an empty directive.
2700
  ///
2701
  explicit OMPTaskwaitDirective()
2702
38
      : OMPExecutableDirective(OMPTaskwaitDirectiveClass,
2703
38
                               llvm::omp::OMPD_taskwait, SourceLocation(),
2704
38
                               SourceLocation()) {}
2705
2706
public:
2707
  /// Creates directive.
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
  ///
2714
  static OMPTaskwaitDirective *Create(const ASTContext &C,
2715
                                      SourceLocation StartLoc,
2716
                                      SourceLocation EndLoc,
2717
                                      ArrayRef<OMPClause *> Clauses);
2718
2719
  /// Creates an empty directive.
2720
  ///
2721
  /// \param C AST context.
2722
  /// \param NumClauses Number of clauses.
2723
  ///
2724
  static OMPTaskwaitDirective *CreateEmpty(const ASTContext &C,
2725
                                           unsigned NumClauses, EmptyShell);
2726
2727
360
  static bool classof(const Stmt *T) {
2728
360
    return T->getStmtClass() == OMPTaskwaitDirectiveClass;
2729
360
  }
2730
};
2731
2732
/// This represents '#pragma omp taskgroup' directive.
2733
///
2734
/// \code
2735
/// #pragma omp taskgroup
2736
/// \endcode
2737
///
2738
class OMPTaskgroupDirective : public OMPExecutableDirective {
2739
  friend class ASTStmtReader;
2740
  friend class OMPExecutableDirective;
2741
  /// Build directive with the given start and end location.
2742
  ///
2743
  /// \param StartLoc Starting location of the directive kind.
2744
  /// \param EndLoc Ending location of the directive.
2745
  ///
2746
  OMPTaskgroupDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2747
8.60k
      : OMPExecutableDirective(OMPTaskgroupDirectiveClass,
2748
8.60k
                               llvm::omp::OMPD_taskgroup, StartLoc, EndLoc) {}
2749
2750
  /// Build an empty directive.
2751
  ///
2752
  explicit OMPTaskgroupDirective()
2753
114
      : OMPExecutableDirective(OMPTaskgroupDirectiveClass,
2754
114
                               llvm::omp::OMPD_taskgroup, SourceLocation(),
2755
114
                               SourceLocation()) {}
2756
2757
  /// Sets the task_reduction return variable.
2758
8.60k
  void setReductionRef(Expr *RR) { Data->getChildren()[0] = RR; }
2759
2760
public:
2761
  /// Creates directive.
2762
  ///
2763
  /// \param C AST context.
2764
  /// \param StartLoc Starting location of the directive kind.
2765
  /// \param EndLoc Ending Location of the directive.
2766
  /// \param Clauses List of clauses.
2767
  /// \param AssociatedStmt Statement, associated with the directive.
2768
  /// \param ReductionRef Reference to the task_reduction return variable.
2769
  ///
2770
  static OMPTaskgroupDirective *
2771
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2772
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2773
         Expr *ReductionRef);
2774
2775
  /// Creates an empty directive.
2776
  ///
2777
  /// \param C AST context.
2778
  /// \param NumClauses Number of clauses.
2779
  ///
2780
  static OMPTaskgroupDirective *CreateEmpty(const ASTContext &C,
2781
                                            unsigned NumClauses, EmptyShell);
2782
2783
2784
  /// Returns reference to the task_reduction return variable.
2785
179
  const Expr *getReductionRef() const {
2786
179
    return const_cast<OMPTaskgroupDirective *>(this)->getReductionRef();
2787
179
  }
2788
179
  Expr *getReductionRef() { return cast_or_null<Expr>(Data->getChildren()[0]); }
2789
2790
19.4k
  static bool classof(const Stmt *T) {
2791
19.4k
    return T->getStmtClass() == OMPTaskgroupDirectiveClass;
2792
19.4k
  }
2793
};
2794
2795
/// This represents '#pragma omp flush' directive.
2796
///
2797
/// \code
2798
/// #pragma omp flush(a,b)
2799
/// \endcode
2800
/// In this example directive '#pragma omp flush' has 2 arguments- variables 'a'
2801
/// and 'b'.
2802
/// 'omp flush' directive does not have clauses but have an optional list of
2803
/// variables to flush. This list of variables is stored within some fake clause
2804
/// FlushClause.
2805
class OMPFlushDirective : public OMPExecutableDirective {
2806
  friend class ASTStmtReader;
2807
  friend class OMPExecutableDirective;
2808
  /// Build directive with the given start and end location.
2809
  ///
2810
  /// \param StartLoc Starting location of the directive kind.
2811
  /// \param EndLoc Ending location of the directive.
2812
  ///
2813
  OMPFlushDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2814
1.15k
      : OMPExecutableDirective(OMPFlushDirectiveClass, llvm::omp::OMPD_flush,
2815
1.15k
                               StartLoc, EndLoc) {}
2816
2817
  /// Build an empty directive.
2818
  ///
2819
  explicit OMPFlushDirective()
2820
50
      : OMPExecutableDirective(OMPFlushDirectiveClass, llvm::omp::OMPD_flush,
2821
50
                               SourceLocation(), SourceLocation()) {}
2822
2823
public:
2824
  /// Creates directive with a list of \a Clauses.
2825
  ///
2826
  /// \param C AST context.
2827
  /// \param StartLoc Starting location of the directive kind.
2828
  /// \param EndLoc Ending Location of the directive.
2829
  /// \param Clauses List of clauses (only single OMPFlushClause clause is
2830
  /// allowed).
2831
  ///
2832
  static OMPFlushDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2833
                                   SourceLocation EndLoc,
2834
                                   ArrayRef<OMPClause *> Clauses);
2835
2836
  /// Creates an empty directive with the place for \a NumClauses
2837
  /// clauses.
2838
  ///
2839
  /// \param C AST context.
2840
  /// \param NumClauses Number of clauses.
2841
  ///
2842
  static OMPFlushDirective *CreateEmpty(const ASTContext &C,
2843
                                        unsigned NumClauses, EmptyShell);
2844
2845
5.27k
  static bool classof(const Stmt *T) {
2846
5.27k
    return T->getStmtClass() == OMPFlushDirectiveClass;
2847
5.27k
  }
2848
};
2849
2850
/// This represents '#pragma omp depobj' directive.
2851
///
2852
/// \code
2853
/// #pragma omp depobj(a) depend(in:x,y)
2854
/// \endcode
2855
/// In this example directive '#pragma omp  depobj' initializes a depobj object
2856
/// 'a' with dependence type 'in' and a list with 'x' and 'y' locators.
2857
class OMPDepobjDirective final : public OMPExecutableDirective {
2858
  friend class ASTStmtReader;
2859
  friend class OMPExecutableDirective;
2860
2861
  /// Build directive with the given start and end location.
2862
  ///
2863
  /// \param StartLoc Starting location of the directive kind.
2864
  /// \param EndLoc Ending location of the directive.
2865
  ///
2866
  OMPDepobjDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2867
552
      : OMPExecutableDirective(OMPDepobjDirectiveClass, llvm::omp::OMPD_depobj,
2868
552
                               StartLoc, EndLoc) {}
2869
2870
  /// Build an empty directive.
2871
  ///
2872
  explicit OMPDepobjDirective()
2873
28
      : OMPExecutableDirective(OMPDepobjDirectiveClass, llvm::omp::OMPD_depobj,
2874
28
                               SourceLocation(), SourceLocation()) {}
2875
2876
public:
2877
  /// Creates directive with a list of \a Clauses.
2878
  ///
2879
  /// \param C AST context.
2880
  /// \param StartLoc Starting location of the directive kind.
2881
  /// \param EndLoc Ending Location of the directive.
2882
  /// \param Clauses List of clauses.
2883
  ///
2884
  static OMPDepobjDirective *Create(const ASTContext &C,
2885
                                    SourceLocation StartLoc,
2886
                                    SourceLocation EndLoc,
2887
                                    ArrayRef<OMPClause *> Clauses);
2888
2889
  /// Creates an empty directive with the place for \a NumClauses
2890
  /// clauses.
2891
  ///
2892
  /// \param C AST context.
2893
  /// \param NumClauses Number of clauses.
2894
  ///
2895
  static OMPDepobjDirective *CreateEmpty(const ASTContext &C,
2896
                                         unsigned NumClauses, EmptyShell);
2897
2898
174
  static bool classof(const Stmt *T) {
2899
174
    return T->getStmtClass() == OMPDepobjDirectiveClass;
2900
174
  }
2901
};
2902
2903
/// This represents '#pragma omp ordered' directive.
2904
///
2905
/// \code
2906
/// #pragma omp ordered
2907
/// \endcode
2908
///
2909
class OMPOrderedDirective : public OMPExecutableDirective {
2910
  friend class ASTStmtReader;
2911
  friend class OMPExecutableDirective;
2912
  /// Build directive with the given start and end location.
2913
  ///
2914
  /// \param StartLoc Starting location of the directive kind.
2915
  /// \param EndLoc Ending location of the directive.
2916
  ///
2917
  OMPOrderedDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2918
1.74k
      : OMPExecutableDirective(OMPOrderedDirectiveClass,
2919
1.74k
                               llvm::omp::OMPD_ordered, StartLoc, EndLoc) {}
2920
2921
  /// Build an empty directive.
2922
  ///
2923
  explicit OMPOrderedDirective()
2924
114
      : OMPExecutableDirective(OMPOrderedDirectiveClass,
2925
114
                               llvm::omp::OMPD_ordered, SourceLocation(),
2926
114
                               SourceLocation()) {}
2927
2928
public:
2929
  /// Creates directive.
2930
  ///
2931
  /// \param C AST context.
2932
  /// \param StartLoc Starting location of the directive kind.
2933
  /// \param EndLoc Ending Location of the directive.
2934
  /// \param Clauses List of clauses.
2935
  /// \param AssociatedStmt Statement, associated with the directive.
2936
  ///
2937
  static OMPOrderedDirective *
2938
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2939
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2940
2941
  /// Creates an empty directive.
2942
  ///
2943
  /// \param C AST context.
2944
  /// \param NumClauses Number of clauses.
2945
  /// \param IsStandalone true, if the standalone directive is created.
2946
  ///
2947
  static OMPOrderedDirective *CreateEmpty(const ASTContext &C,
2948
                                          unsigned NumClauses,
2949
                                          bool IsStandalone, EmptyShell);
2950
2951
811
  static bool classof(const Stmt *T) {
2952
811
    return T->getStmtClass() == OMPOrderedDirectiveClass;
2953
811
  }
2954
};
2955
2956
/// This represents '#pragma omp atomic' directive.
2957
///
2958
/// \code
2959
/// #pragma omp atomic capture
2960
/// \endcode
2961
/// In this example directive '#pragma omp atomic' has clause 'capture'.
2962
///
2963
class OMPAtomicDirective : public OMPExecutableDirective {
2964
  friend class ASTStmtReader;
2965
  friend class OMPExecutableDirective;
2966
2967
  struct FlagTy {
2968
    /// Used for 'atomic update' or 'atomic capture' constructs. They may
2969
    /// have atomic expressions of forms:
2970
    /// \code
2971
    /// x = x binop expr;
2972
    /// x = expr binop x;
2973
    /// \endcode
2974
    /// This field is 1 for the first form of the expression and 0 for the
2975
    /// second. Required for correct codegen of non-associative operations (like
2976
    /// << or >>).
2977
    uint8_t IsXLHSInRHSPart : 1;
2978
    /// Used for 'atomic update' or 'atomic capture' constructs. They may
2979
    /// have atomic expressions of forms:
2980
    /// \code
2981
    /// v = x; <update x>;
2982
    /// <update x>; v = x;
2983
    /// \endcode
2984
    /// This field is 1 for the first(postfix) form of the expression and 0
2985
    /// otherwise.
2986
    uint8_t IsPostfixUpdate : 1;
2987
    /// 1 if 'v' is updated only when the condition is false (compare capture
2988
    /// only).
2989
    uint8_t IsFailOnly : 1;
2990
  } Flags;
2991
2992
  /// Build directive with the given start and end location.
2993
  ///
2994
  /// \param StartLoc Starting location of the directive kind.
2995
  /// \param EndLoc Ending location of the directive.
2996
  ///
2997
  OMPAtomicDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2998
18.8k
      : OMPExecutableDirective(OMPAtomicDirectiveClass, llvm::omp::OMPD_atomic,
2999
18.8k
                               StartLoc, EndLoc) {}
3000
3001
  /// Build an empty directive.
3002
  ///
3003
  explicit OMPAtomicDirective()
3004
6.29k
      : OMPExecutableDirective(OMPAtomicDirectiveClass, llvm::omp::OMPD_atomic,
3005
6.29k
                               SourceLocation(), SourceLocation()) {}
3006
3007
  enum DataPositionTy : size_t {
3008
    POS_X = 0,
3009
    POS_V,
3010
    POS_E,
3011
    POS_UpdateExpr,
3012
    POS_D,
3013
    POS_Cond,
3014
    POS_R,
3015
  };
3016
3017
  /// Set 'x' part of the associated expression/statement.
3018
18.8k
  void setX(Expr *X) { Data->getChildren()[DataPositionTy::POS_X] = X; }
3019
  /// Set helper expression of the form
3020
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
3021
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
3022
18.8k
  void setUpdateExpr(Expr *UE) {
3023
18.8k
    Data->getChildren()[DataPositionTy::POS_UpdateExpr] = UE;
3024
18.8k
  }
3025
  /// Set 'v' part of the associated expression/statement.
3026
18.8k
  void setV(Expr *V) { Data->getChildren()[DataPositionTy::POS_V] = V; }
3027
  /// Set 'r' part of the associated expression/statement.
3028
18.8k
  void setR(Expr *R) { Data->getChildren()[DataPositionTy::POS_R] = R; }
3029
  /// Set 'expr' part of the associated expression/statement.
3030
18.8k
  void setExpr(Expr *E) { Data->getChildren()[DataPositionTy::POS_E] = E; }
3031
  /// Set 'd' part of the associated expression/statement.
3032
18.8k
  void setD(Expr *D) { Data->getChildren()[DataPositionTy::POS_D] = D; }
3033
  /// Set conditional expression in `atomic compare`.
3034
18.8k
  void setCond(Expr *C) { Data->getChildren()[DataPositionTy::POS_Cond] = C; }
3035
3036
public:
3037
  struct Expressions {
3038
    /// 'x' part of the associated expression/statement.
3039
    Expr *X = nullptr;
3040
    /// 'v' part of the associated expression/statement.
3041
    Expr *V = nullptr;
3042
    // 'r' part of the associated expression/statement.
3043
    Expr *R = nullptr;
3044
    /// 'expr' part of the associated expression/statement.
3045
    Expr *E = nullptr;
3046
    /// UE Helper expression of the form:
3047
    /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
3048
    /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
3049
    Expr *UE = nullptr;
3050
    /// 'd' part of the associated expression/statement.
3051
    Expr *D = nullptr;
3052
    /// Conditional expression in `atomic compare` construct.
3053
    Expr *Cond = nullptr;
3054
    /// True if UE has the first form and false if the second.
3055
    bool IsXLHSInRHSPart;
3056
    /// True if original value of 'x' must be stored in 'v', not an updated one.
3057
    bool IsPostfixUpdate;
3058
    /// True if 'v' is updated only when the condition is false (compare capture
3059
    /// only).
3060
    bool IsFailOnly;
3061
  };
3062
3063
  /// Creates directive with a list of \a Clauses and 'x', 'v' and 'expr'
3064
  /// parts of the atomic construct (see Section 2.12.6, atomic Construct, for
3065
  /// detailed description of 'x', 'v' and 'expr').
3066
  ///
3067
  /// \param C AST context.
3068
  /// \param StartLoc Starting location of the directive kind.
3069
  /// \param EndLoc Ending Location of the directive.
3070
  /// \param Clauses List of clauses.
3071
  /// \param AssociatedStmt Statement, associated with the directive.
3072
  /// \param Exprs Associated expressions or statements.
3073
  static OMPAtomicDirective *Create(const ASTContext &C,
3074
                                    SourceLocation StartLoc,
3075
                                    SourceLocation EndLoc,
3076
                                    ArrayRef<OMPClause *> Clauses,
3077
                                    Stmt *AssociatedStmt, Expressions Exprs);
3078
3079
  /// Creates an empty directive with the place for \a NumClauses
3080
  /// clauses.
3081
  ///
3082
  /// \param C AST context.
3083
  /// \param NumClauses Number of clauses.
3084
  ///
3085
  static OMPAtomicDirective *CreateEmpty(const ASTContext &C,
3086
                                         unsigned NumClauses, EmptyShell);
3087
3088
  /// Get 'x' part of the associated expression/statement.
3089
0
  Expr *getX() {
3090
0
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_X]);
3091
0
  }
3092
5.65k
  const Expr *getX() const {
3093
5.65k
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_X]);
3094
5.65k
  }
3095
  /// Get helper expression of the form
3096
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
3097
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
3098
0
  Expr *getUpdateExpr() {
3099
0
    return cast_or_null<Expr>(
3100
0
        Data->getChildren()[DataPositionTy::POS_UpdateExpr]);
3101
0
  }
3102
5.65k
  const Expr *getUpdateExpr() const {
3103
5.65k
    return cast_or_null<Expr>(
3104
5.65k
        Data->getChildren()[DataPositionTy::POS_UpdateExpr]);
3105
5.65k
  }
3106
  /// Return true if helper update expression has form
3107
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and false if it has form
3108
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
3109
11.9k
  bool isXLHSInRHSPart() const { return Flags.IsXLHSInRHSPart; }
3110
  /// Return true if 'v' expression must be updated to original value of
3111
  /// 'x', false if 'v' must be updated to the new value of 'x'.
3112
11.9k
  bool isPostfixUpdate() const { return Flags.IsPostfixUpdate; }
3113
  /// Return true if 'v' is updated only when the condition is evaluated false
3114
  /// (compare capture only).
3115
11.9k
  bool isFailOnly() const { return Flags.IsFailOnly; }
3116
  /// Get 'v' part of the associated expression/statement.
3117
0
  Expr *getV() {
3118
0
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_V]);
3119
0
  }
3120
5.65k
  const Expr *getV() const {
3121
5.65k
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_V]);
3122
5.65k
  }
3123
  /// Get 'r' part of the associated expression/statement.
3124
0
  Expr *getR() {
3125
0
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_R]);
3126
0
  }
3127
5.65k
  const Expr *getR() const {
3128
5.65k
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_R]);
3129
5.65k
  }
3130
  /// Get 'expr' part of the associated expression/statement.
3131
0
  Expr *getExpr() {
3132
0
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_E]);
3133
0
  }
3134
5.65k
  const Expr *getExpr() const {
3135
5.65k
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_E]);
3136
5.65k
  }
3137
  /// Get 'd' part of the associated expression/statement.
3138
0
  Expr *getD() {
3139
0
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_D]);
3140
0
  }
3141
5.65k
  Expr *getD() const {
3142
5.65k
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_D]);
3143
5.65k
  }
3144
  /// Get the 'cond' part of the source atomic expression.
3145
0
  Expr *getCondExpr() {
3146
0
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_Cond]);
3147
0
  }
3148
5.65k
  Expr *getCondExpr() const {
3149
5.65k
    return cast_or_null<Expr>(Data->getChildren()[DataPositionTy::POS_Cond]);
3150
5.65k
  }
3151
3152
9.63k
  static bool classof(const Stmt *T) {
3153
9.63k
    return T->getStmtClass() == OMPAtomicDirectiveClass;
3154
9.63k
  }
3155
};
3156
3157
/// This represents '#pragma omp target' directive.
3158
///
3159
/// \code
3160
/// #pragma omp target if(a)
3161
/// \endcode
3162
/// In this example directive '#pragma omp target' has clause 'if' with
3163
/// condition 'a'.
3164
///
3165
class OMPTargetDirective : public OMPExecutableDirective {
3166
  friend class ASTStmtReader;
3167
  friend class OMPExecutableDirective;
3168
  /// Build directive with the given start and end location.
3169
  ///
3170
  /// \param StartLoc Starting location of the directive kind.
3171
  /// \param EndLoc Ending location of the directive.
3172
  ///
3173
  OMPTargetDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3174
73.1k
      : OMPExecutableDirective(OMPTargetDirectiveClass, llvm::omp::OMPD_target,
3175
73.1k
                               StartLoc, EndLoc) {}
3176
3177
  /// Build an empty directive.
3178
  ///
3179
  explicit OMPTargetDirective()
3180
5.17k
      : OMPExecutableDirective(OMPTargetDirectiveClass, llvm::omp::OMPD_target,
3181
5.17k
                               SourceLocation(), SourceLocation()) {}
3182
3183
public:
3184
  /// Creates directive with a list of \a Clauses.
3185
  ///
3186
  /// \param C AST context.
3187
  /// \param StartLoc Starting location of the directive kind.
3188
  /// \param EndLoc Ending Location of the directive.
3189
  /// \param Clauses List of clauses.
3190
  /// \param AssociatedStmt Statement, associated with the directive.
3191
  ///
3192
  static OMPTargetDirective *
3193
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3194
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3195
3196
  /// Creates an empty directive with the place for \a NumClauses
3197
  /// clauses.
3198
  ///
3199
  /// \param C AST context.
3200
  /// \param NumClauses Number of clauses.
3201
  ///
3202
  static OMPTargetDirective *CreateEmpty(const ASTContext &C,
3203
                                         unsigned NumClauses, EmptyShell);
3204
3205
34.2k
  static bool classof(const Stmt *T) {
3206
34.2k
    return T->getStmtClass() == OMPTargetDirectiveClass;
3207
34.2k
  }
3208
};
3209
3210
/// This represents '#pragma omp target data' directive.
3211
///
3212
/// \code
3213
/// #pragma omp target data device(0) if(a) map(b[:])
3214
/// \endcode
3215
/// In this example directive '#pragma omp target data' has clauses 'device'
3216
/// with the value '0', 'if' with condition 'a' and 'map' with array
3217
/// section 'b[:]'.
3218
///
3219
class OMPTargetDataDirective : public OMPExecutableDirective {
3220
  friend class ASTStmtReader;
3221
  friend class OMPExecutableDirective;
3222
  /// Build directive with the given start and end location.
3223
  ///
3224
  /// \param StartLoc Starting location of the directive kind.
3225
  /// \param EndLoc Ending Location of the directive.
3226
  ///
3227
  OMPTargetDataDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3228
5.86k
      : OMPExecutableDirective(OMPTargetDataDirectiveClass,
3229
5.86k
                               llvm::omp::OMPD_target_data, StartLoc, EndLoc) {}
3230
3231
  /// Build an empty directive.
3232
  ///
3233
  explicit OMPTargetDataDirective()
3234
277
      : OMPExecutableDirective(OMPTargetDataDirectiveClass,
3235
277
                               llvm::omp::OMPD_target_data, SourceLocation(),
3236
277
                               SourceLocation()) {}
3237
3238
public:
3239
  /// Creates directive with a list of \a Clauses.
3240
  ///
3241
  /// \param C AST context.
3242
  /// \param StartLoc Starting location of the directive kind.
3243
  /// \param EndLoc Ending Location of the directive.
3244
  /// \param Clauses List of clauses.
3245
  /// \param AssociatedStmt Statement, associated with the directive.
3246
  ///
3247
  static OMPTargetDataDirective *
3248
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3249
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3250
3251
  /// Creates an empty directive with the place for \a N clauses.
3252
  ///
3253
  /// \param C AST context.
3254
  /// \param N The number of clauses.
3255
  ///
3256
  static OMPTargetDataDirective *CreateEmpty(const ASTContext &C, unsigned N,
3257
                                             EmptyShell);
3258
3259
2.68k
  static bool classof(const Stmt *T) {
3260
2.68k
    return T->getStmtClass() == OMPTargetDataDirectiveClass;
3261
2.68k
  }
3262
};
3263
3264
/// This represents '#pragma omp target enter data' directive.
3265
///
3266
/// \code
3267
/// #pragma omp target enter data device(0) if(a) map(b[:])
3268
/// \endcode
3269
/// In this example directive '#pragma omp target enter data' has clauses
3270
/// 'device' with the value '0', 'if' with condition 'a' and 'map' with array
3271
/// section 'b[:]'.
3272
///
3273
class OMPTargetEnterDataDirective : public OMPExecutableDirective {
3274
  friend class ASTStmtReader;
3275
  friend class OMPExecutableDirective;
3276
  /// Build directive with the given start and end location.
3277
  ///
3278
  /// \param StartLoc Starting location of the directive kind.
3279
  /// \param EndLoc Ending Location of the directive.
3280
  ///
3281
  OMPTargetEnterDataDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3282
2.35k
      : OMPExecutableDirective(OMPTargetEnterDataDirectiveClass,
3283
2.35k
                               llvm::omp::OMPD_target_enter_data, StartLoc,
3284
2.35k
                               EndLoc) {}
3285
3286
  /// Build an empty directive.
3287
  ///
3288
  explicit OMPTargetEnterDataDirective()
3289
343
      : OMPExecutableDirective(OMPTargetEnterDataDirectiveClass,
3290
343
                               llvm::omp::OMPD_target_enter_data,
3291
343
                               SourceLocation(), SourceLocation()) {}
3292
3293
public:
3294
  /// Creates directive with a list of \a Clauses.
3295
  ///
3296
  /// \param C AST context.
3297
  /// \param StartLoc Starting location of the directive kind.
3298
  /// \param EndLoc Ending Location of the directive.
3299
  /// \param Clauses List of clauses.
3300
  /// \param AssociatedStmt Statement, associated with the directive.
3301
  ///
3302
  static OMPTargetEnterDataDirective *
3303
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3304
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3305
3306
  /// Creates an empty directive with the place for \a N clauses.
3307
  ///
3308
  /// \param C AST context.
3309
  /// \param N The number of clauses.
3310
  ///
3311
  static OMPTargetEnterDataDirective *CreateEmpty(const ASTContext &C,
3312
                                                  unsigned N, EmptyShell);
3313
3314
47.8k
  static bool classof(const Stmt *T) {
3315
47.8k
    return T->getStmtClass() == OMPTargetEnterDataDirectiveClass;
3316
47.8k
  }
3317
};
3318
3319
/// This represents '#pragma omp target exit data' directive.
3320
///
3321
/// \code
3322
/// #pragma omp target exit data device(0) if(a) map(b[:])
3323
/// \endcode
3324
/// In this example directive '#pragma omp target exit data' has clauses
3325
/// 'device' with the value '0', 'if' with condition 'a' and 'map' with array
3326
/// section 'b[:]'.
3327
///
3328
class OMPTargetExitDataDirective : public OMPExecutableDirective {
3329
  friend class ASTStmtReader;
3330
  friend class OMPExecutableDirective;
3331
  /// Build directive with the given start and end location.
3332
  ///
3333
  /// \param StartLoc Starting location of the directive kind.
3334
  /// \param EndLoc Ending Location of the directive.
3335
  ///
3336
  OMPTargetExitDataDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3337
2.33k
      : OMPExecutableDirective(OMPTargetExitDataDirectiveClass,
3338
2.33k
                               llvm::omp::OMPD_target_exit_data, StartLoc,
3339
2.33k
                               EndLoc) {}
3340
3341
  /// Build an empty directive.
3342
  ///
3343
  explicit OMPTargetExitDataDirective()
3344
335
      : OMPExecutableDirective(OMPTargetExitDataDirectiveClass,
3345
335
                               llvm::omp::OMPD_target_exit_data,
3346
335
                               SourceLocation(), SourceLocation()) {}
3347
3348
public:
3349
  /// Creates directive with a list of \a Clauses.
3350
  ///
3351
  /// \param C AST context.
3352
  /// \param StartLoc Starting location of the directive kind.
3353
  /// \param EndLoc Ending Location of the directive.
3354
  /// \param Clauses List of clauses.
3355
  /// \param AssociatedStmt Statement, associated with the directive.
3356
  ///
3357
  static OMPTargetExitDataDirective *
3358
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3359
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3360
3361
  /// Creates an empty directive with the place for \a N clauses.
3362
  ///
3363
  /// \param C AST context.
3364
  /// \param N The number of clauses.
3365
  ///
3366
  static OMPTargetExitDataDirective *CreateEmpty(const ASTContext &C,
3367
                                                 unsigned N, EmptyShell);
3368
3369
47.1k
  static bool classof(const Stmt *T) {
3370
47.1k
    return T->getStmtClass() == OMPTargetExitDataDirectiveClass;
3371
47.1k
  }
3372
};
3373
3374
/// This represents '#pragma omp target parallel' directive.
3375
///
3376
/// \code
3377
/// #pragma omp target parallel if(a)
3378
/// \endcode
3379
/// In this example directive '#pragma omp target parallel' has clause 'if' with
3380
/// condition 'a'.
3381
///
3382
class OMPTargetParallelDirective : public OMPExecutableDirective {
3383
  friend class ASTStmtReader;
3384
  friend class OMPExecutableDirective;
3385
  /// true if the construct has inner cancel directive.
3386
  bool HasCancel = false;
3387
3388
  /// Build directive with the given start and end location.
3389
  ///
3390
  /// \param StartLoc Starting location of the directive kind.
3391
  /// \param EndLoc Ending location of the directive.
3392
  ///
3393
  OMPTargetParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3394
9.84k
      : OMPExecutableDirective(OMPTargetParallelDirectiveClass,
3395
9.84k
                               llvm::omp::OMPD_target_parallel, StartLoc,
3396
9.84k
                               EndLoc) {}
3397
3398
  /// Build an empty directive.
3399
  ///
3400
  explicit OMPTargetParallelDirective()
3401
618
      : OMPExecutableDirective(OMPTargetParallelDirectiveClass,
3402
618
                               llvm::omp::OMPD_target_parallel,
3403
618
                               SourceLocation(), SourceLocation()) {}
3404
3405
  /// Sets special task reduction descriptor.
3406
9.84k
  void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
3407
  /// Set cancel state.
3408
10.4k
  void setHasCancel(bool Has) { HasCancel = Has; }
3409
3410
public:
3411
  /// Creates directive with a list of \a Clauses.
3412
  ///
3413
  /// \param C AST context.
3414
  /// \param StartLoc Starting location of the directive kind.
3415
  /// \param EndLoc Ending Location of the directive.
3416
  /// \param Clauses List of clauses.
3417
  /// \param AssociatedStmt Statement, associated with the directive.
3418
  /// \param TaskRedRef Task reduction special reference expression to handle
3419
  /// taskgroup descriptor.
3420
  /// \param HasCancel true if this directive has inner cancel directive.
3421
  ///
3422
  static OMPTargetParallelDirective *
3423
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3424
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
3425
         bool HasCancel);
3426
3427
  /// Creates an empty directive with the place for \a NumClauses
3428
  /// clauses.
3429
  ///
3430
  /// \param C AST context.
3431
  /// \param NumClauses Number of clauses.
3432
  ///
3433
  static OMPTargetParallelDirective *
3434
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
3435
3436
  /// Returns special task reduction reference expression.
3437
2
  Expr *getTaskReductionRefExpr() {
3438
2
    return cast_or_null<Expr>(Data->getChildren()[0]);
3439
2
  }
3440
2
  const Expr *getTaskReductionRefExpr() const {
3441
2
    return const_cast<OMPTargetParallelDirective *>(this)
3442
2
        ->getTaskReductionRefExpr();
3443
2
  }
3444
3445
  /// Return true if current directive has inner cancel directive.
3446
1.49k
  bool hasCancel() const { return HasCancel; }
3447
3448
16.2k
  static bool classof(const Stmt *T) {
3449
16.2k
    return T->getStmtClass() == OMPTargetParallelDirectiveClass;
3450
16.2k
  }
3451
};
3452
3453
/// This represents '#pragma omp target parallel for' directive.
3454
///
3455
/// \code
3456
/// #pragma omp target parallel for private(a,b) reduction(+:c,d)
3457
/// \endcode
3458
/// In this example directive '#pragma omp target parallel for' has clauses
3459
/// 'private' with the variables 'a' and 'b' and 'reduction' with operator '+'
3460
/// and variables 'c' and 'd'.
3461
///
3462
class OMPTargetParallelForDirective : public OMPLoopDirective {
3463
  friend class ASTStmtReader;
3464
  friend class OMPExecutableDirective;
3465
3466
  /// true if current region has inner cancel directive.
3467
  bool HasCancel = false;
3468
3469
  /// Build directive with the given start and end location.
3470
  ///
3471
  /// \param StartLoc Starting location of the directive kind.
3472
  /// \param EndLoc Ending location of the directive.
3473
  /// \param CollapsedNum Number of collapsed nested loops.
3474
  ///
3475
  OMPTargetParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3476
                                unsigned CollapsedNum)
3477
10.2k
      : OMPLoopDirective(OMPTargetParallelForDirectiveClass,
3478
10.2k
                         llvm::omp::OMPD_target_parallel_for, StartLoc, EndLoc,
3479
10.2k
                         CollapsedNum) {}
3480
3481
  /// Build an empty directive.
3482
  ///
3483
  /// \param CollapsedNum Number of collapsed nested loops.
3484
  ///
3485
  explicit OMPTargetParallelForDirective(unsigned CollapsedNum)
3486
502
      : OMPLoopDirective(OMPTargetParallelForDirectiveClass,
3487
502
                         llvm::omp::OMPD_target_parallel_for, SourceLocation(),
3488
502
                         SourceLocation(), CollapsedNum) {}
3489
3490
  /// Sets special task reduction descriptor.
3491
10.2k
  void setTaskReductionRefExpr(Expr *E) {
3492
10.2k
    Data->getChildren()[numLoopChildren(
3493
10.2k
        getLoopsNumber(), llvm::omp::OMPD_target_parallel_for)] = E;
3494
10.2k
  }
3495
3496
  /// Set cancel state.
3497
10.7k
  void setHasCancel(bool Has) { HasCancel = Has; }
3498
3499
public:
3500
  /// Creates directive with a list of \a Clauses.
3501
  ///
3502
  /// \param C AST context.
3503
  /// \param StartLoc Starting location of the directive kind.
3504
  /// \param EndLoc Ending Location of the directive.
3505
  /// \param CollapsedNum Number of collapsed loops.
3506
  /// \param Clauses List of clauses.
3507
  /// \param AssociatedStmt Statement, associated with the directive.
3508
  /// \param Exprs Helper expressions for CodeGen.
3509
  /// \param TaskRedRef Task reduction special reference expression to handle
3510
  /// taskgroup descriptor.
3511
  /// \param HasCancel true if current directive has inner cancel directive.
3512
  ///
3513
  static OMPTargetParallelForDirective *
3514
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3515
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3516
         Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
3517
         bool HasCancel);
3518
3519
  /// Creates an empty directive with the place
3520
  /// for \a NumClauses clauses.
3521
  ///
3522
  /// \param C AST context.
3523
  /// \param CollapsedNum Number of collapsed nested loops.
3524
  /// \param NumClauses Number of clauses.
3525
  ///
3526
  static OMPTargetParallelForDirective *CreateEmpty(const ASTContext &C,
3527
                                                    unsigned NumClauses,
3528
                                                    unsigned CollapsedNum,
3529
                                                    EmptyShell);
3530
3531
  /// Returns special task reduction reference expression.
3532
3
  Expr *getTaskReductionRefExpr() {
3533
3
    return cast_or_null<Expr>(Data->getChildren()[numLoopChildren(
3534
3
        getLoopsNumber(), llvm::omp::OMPD_target_parallel_for)]);
3535
3
  }
3536
3
  const Expr *getTaskReductionRefExpr() const {
3537
3
    return const_cast<OMPTargetParallelForDirective *>(this)
3538
3
        ->getTaskReductionRefExpr();
3539
3
  }
3540
3541
  /// Return true if current directive has inner cancel directive.
3542
1.55k
  bool hasCancel() const { return HasCancel; }
3543
3544
14.9k
  static bool classof(const Stmt *T) {
3545
14.9k
    return T->getStmtClass() == OMPTargetParallelForDirectiveClass;
3546
14.9k
  }
3547
};
3548
3549
/// This represents '#pragma omp teams' directive.
3550
///
3551
/// \code
3552
/// #pragma omp teams if(a)
3553
/// \endcode
3554
/// In this example directive '#pragma omp teams' has clause 'if' with
3555
/// condition 'a'.
3556
///
3557
class OMPTeamsDirective : public OMPExecutableDirective {
3558
  friend class ASTStmtReader;
3559
  friend class OMPExecutableDirective;
3560
  /// Build directive with the given start and end location.
3561
  ///
3562
  /// \param StartLoc Starting location of the directive kind.
3563
  /// \param EndLoc Ending location of the directive.
3564
  ///
3565
  OMPTeamsDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3566
26.2k
      : OMPExecutableDirective(OMPTeamsDirectiveClass, llvm::omp::OMPD_teams,
3567
26.2k
                               StartLoc, EndLoc) {}
3568
3569
  /// Build an empty directive.
3570
  ///
3571
  explicit OMPTeamsDirective()
3572
1.03k
      : OMPExecutableDirective(OMPTeamsDirectiveClass, llvm::omp::OMPD_teams,
3573
1.03k
                               SourceLocation(), SourceLocation()) {}
3574
3575
public:
3576
  /// Creates directive with a list of \a Clauses.
3577
  ///
3578
  /// \param C AST context.
3579
  /// \param StartLoc Starting location of the directive kind.
3580
  /// \param EndLoc Ending Location of the directive.
3581
  /// \param Clauses List of clauses.
3582
  /// \param AssociatedStmt Statement, associated with the directive.
3583
  ///
3584
  static OMPTeamsDirective *Create(const ASTContext &C, SourceLocation StartLoc,
3585
                                   SourceLocation EndLoc,
3586
                                   ArrayRef<OMPClause *> Clauses,
3587
                                   Stmt *AssociatedStmt);
3588
3589
  /// Creates an empty directive with the place for \a NumClauses
3590
  /// clauses.
3591
  ///
3592
  /// \param C AST context.
3593
  /// \param NumClauses Number of clauses.
3594
  ///
3595
  static OMPTeamsDirective *CreateEmpty(const ASTContext &C,
3596
                                        unsigned NumClauses, EmptyShell);
3597
3598
11.8k
  static bool classof(const Stmt *T) {
3599
11.8k
    return T->getStmtClass() == OMPTeamsDirectiveClass;
3600
11.8k
  }
3601
};
3602
3603
/// This represents '#pragma omp cancellation point' directive.
3604
///
3605
/// \code
3606
/// #pragma omp cancellation point for
3607
/// \endcode
3608
///
3609
/// In this example a cancellation point is created for innermost 'for' region.
3610
class OMPCancellationPointDirective : public OMPExecutableDirective {
3611
  friend class ASTStmtReader;
3612
  friend class OMPExecutableDirective;
3613
  OpenMPDirectiveKind CancelRegion = llvm::omp::OMPD_unknown;
3614
  /// Build directive with the given start and end location.
3615
  ///
3616
  /// \param StartLoc Starting location of the directive kind.
3617
  /// \param EndLoc Ending location of the directive.
3618
  /// statements and child expressions.
3619
  ///
3620
  OMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3621
253
      : OMPExecutableDirective(OMPCancellationPointDirectiveClass,
3622
253
                               llvm::omp::OMPD_cancellation_point, StartLoc,
3623
253
                               EndLoc) {}
3624
3625
  /// Build an empty directive.
3626
  explicit OMPCancellationPointDirective()
3627
78
      : OMPExecutableDirective(OMPCancellationPointDirectiveClass,
3628
78
                               llvm::omp::OMPD_cancellation_point,
3629
78
                               SourceLocation(), SourceLocation()) {}
3630
3631
  /// Set cancel region for current cancellation point.
3632
  /// \param CR Cancellation region.
3633
331
  void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; }
3634
3635
public:
3636
  /// Creates directive.
3637
  ///
3638
  /// \param C AST context.
3639
  /// \param StartLoc Starting location of the directive kind.
3640
  /// \param EndLoc Ending Location of the directive.
3641
  ///
3642
  static OMPCancellationPointDirective *
3643
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3644
         OpenMPDirectiveKind CancelRegion);
3645
3646
  /// Creates an empty directive.
3647
  ///
3648
  /// \param C AST context.
3649
  ///
3650
  static OMPCancellationPointDirective *CreateEmpty(const ASTContext &C,
3651
                                                    EmptyShell);
3652
3653
  /// Get cancellation region for the current cancellation point.
3654
321
  OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; }
3655
3656
190
  static bool classof(const Stmt *T) {
3657
190
    return T->getStmtClass() == OMPCancellationPointDirectiveClass;
3658
190
  }
3659
};
3660
3661
/// This represents '#pragma omp cancel' directive.
3662
///
3663
/// \code
3664
/// #pragma omp cancel for
3665
/// \endcode
3666
///
3667
/// In this example a cancel is created for innermost 'for' region.
3668
class OMPCancelDirective : public OMPExecutableDirective {
3669
  friend class ASTStmtReader;
3670
  friend class OMPExecutableDirective;
3671
  OpenMPDirectiveKind CancelRegion = llvm::omp::OMPD_unknown;
3672
  /// Build directive with the given start and end location.
3673
  ///
3674
  /// \param StartLoc Starting location of the directive kind.
3675
  /// \param EndLoc Ending location of the directive.
3676
  ///
3677
  OMPCancelDirective(SourceLocation StartLoc, SourceLocation EndLoc)
3678
712
      : OMPExecutableDirective(OMPCancelDirectiveClass, llvm::omp::OMPD_cancel,
3679
712
                               StartLoc, EndLoc) {}
3680
3681
  /// Build an empty directive.
3682
  ///
3683
  explicit OMPCancelDirective()
3684
176
      : OMPExecutableDirective(OMPCancelDirectiveClass, llvm::omp::OMPD_cancel,
3685
176
                               SourceLocation(), SourceLocation()) {}
3686
3687
  /// Set cancel region for current cancellation point.
3688
  /// \param CR Cancellation region.
3689
888
  void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; }
3690
3691
public:
3692
  /// Creates directive.
3693
  ///
3694
  /// \param C AST context.
3695
  /// \param StartLoc Starting location of the directive kind.
3696
  /// \param EndLoc Ending Location of the directive.
3697
  /// \param Clauses List of clauses.
3698
  ///
3699
  static OMPCancelDirective *
3700
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3701
         ArrayRef<OMPClause *> Clauses, OpenMPDirectiveKind CancelRegion);
3702
3703
  /// Creates an empty directive.
3704
  ///
3705
  /// \param C AST context.
3706
  /// \param NumClauses Number of clauses.
3707
  ///
3708
  static OMPCancelDirective *CreateEmpty(const ASTContext &C,
3709
                                         unsigned NumClauses, EmptyShell);
3710
3711
  /// Get cancellation region for the current cancellation point.
3712
732
  OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; }
3713
3714
451
  static bool classof(const Stmt *T) {
3715
451
    return T->getStmtClass() == OMPCancelDirectiveClass;
3716
451
  }
3717
};
3718
3719
/// This represents '#pragma omp taskloop' directive.
3720
///
3721
/// \code
3722
/// #pragma omp taskloop private(a,b) grainsize(val) num_tasks(num)
3723
/// \endcode
3724
/// In this example directive '#pragma omp taskloop' has clauses 'private'
3725
/// with the variables 'a' and 'b', 'grainsize' with expression 'val' and
3726
/// 'num_tasks' with expression 'num'.
3727
///
3728
class OMPTaskLoopDirective : public OMPLoopDirective {
3729
  friend class ASTStmtReader;
3730
  friend class OMPExecutableDirective;
3731
  /// true if the construct has inner cancel directive.
3732
  bool HasCancel = false;
3733
3734
  /// Build directive with the given start and end location.
3735
  ///
3736
  /// \param StartLoc Starting location of the directive kind.
3737
  /// \param EndLoc Ending location of the directive.
3738
  /// \param CollapsedNum Number of collapsed nested loops.
3739
  ///
3740
  OMPTaskLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3741
                       unsigned CollapsedNum)
3742
8.64k
      : OMPLoopDirective(OMPTaskLoopDirectiveClass, llvm::omp::OMPD_taskloop,
3743
8.64k
                         StartLoc, EndLoc, CollapsedNum) {}
3744
3745
  /// Build an empty directive.
3746
  ///
3747
  /// \param CollapsedNum Number of collapsed nested loops.
3748
  ///
3749
  explicit OMPTaskLoopDirective(unsigned CollapsedNum)
3750
48
      : OMPLoopDirective(OMPTaskLoopDirectiveClass, llvm::omp::OMPD_taskloop,
3751
48
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
3752
3753
  /// Set cancel state.
3754
8.69k
  void setHasCancel(bool Has) { HasCancel = Has; }
3755
3756
public:
3757
  /// Creates directive with a list of \a Clauses.
3758
  ///
3759
  /// \param C AST context.
3760
  /// \param StartLoc Starting location of the directive kind.
3761
  /// \param EndLoc Ending Location of the directive.
3762
  /// \param CollapsedNum Number of collapsed loops.
3763
  /// \param Clauses List of clauses.
3764
  /// \param AssociatedStmt Statement, associated with the directive.
3765
  /// \param Exprs Helper expressions for CodeGen.
3766
  /// \param HasCancel true if this directive has inner cancel directive.
3767
  ///
3768
  static OMPTaskLoopDirective *
3769
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3770
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3771
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3772
3773
  /// Creates an empty directive with the place
3774
  /// for \a NumClauses clauses.
3775
  ///
3776
  /// \param C AST context.
3777
  /// \param CollapsedNum Number of collapsed nested loops.
3778
  /// \param NumClauses Number of clauses.
3779
  ///
3780
  static OMPTaskLoopDirective *CreateEmpty(const ASTContext &C,
3781
                                           unsigned NumClauses,
3782
                                           unsigned CollapsedNum, EmptyShell);
3783
3784
  /// Return true if current directive has inner cancel directive.
3785
88
  bool hasCancel() const { return HasCancel; }
3786
3787
4.92k
  static bool classof(const Stmt *T) {
3788
4.92k
    return T->getStmtClass() == OMPTaskLoopDirectiveClass;
3789
4.92k
  }
3790
};
3791
3792
/// This represents '#pragma omp taskloop simd' directive.
3793
///
3794
/// \code
3795
/// #pragma omp taskloop simd private(a,b) grainsize(val) num_tasks(num)
3796
/// \endcode
3797
/// In this example directive '#pragma omp taskloop simd' has clauses 'private'
3798
/// with the variables 'a' and 'b', 'grainsize' with expression 'val' and
3799
/// 'num_tasks' with expression 'num'.
3800
///
3801
class OMPTaskLoopSimdDirective : public OMPLoopDirective {
3802
  friend class ASTStmtReader;
3803
  friend class OMPExecutableDirective;
3804
  /// Build directive with the given start and end location.
3805
  ///
3806
  /// \param StartLoc Starting location of the directive kind.
3807
  /// \param EndLoc Ending location of the directive.
3808
  /// \param CollapsedNum Number of collapsed nested loops.
3809
  ///
3810
  OMPTaskLoopSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3811
                           unsigned CollapsedNum)
3812
7.32k
      : OMPLoopDirective(OMPTaskLoopSimdDirectiveClass,
3813
7.32k
                         llvm::omp::OMPD_taskloop_simd, StartLoc, EndLoc,
3814
7.32k
                         CollapsedNum) {}
3815
3816
  /// Build an empty directive.
3817
  ///
3818
  /// \param CollapsedNum Number of collapsed nested loops.
3819
  ///
3820
  explicit OMPTaskLoopSimdDirective(unsigned CollapsedNum)
3821
46
      : OMPLoopDirective(OMPTaskLoopSimdDirectiveClass,
3822
46
                         llvm::omp::OMPD_taskloop_simd, SourceLocation(),
3823
46
                         SourceLocation(), CollapsedNum) {}
3824
3825
public:
3826
  /// Creates directive with a list of \a Clauses.
3827
  ///
3828
  /// \param C AST context.
3829
  /// \param StartLoc Starting location of the directive kind.
3830
  /// \param EndLoc Ending Location of the directive.
3831
  /// \param CollapsedNum Number of collapsed loops.
3832
  /// \param Clauses List of clauses.
3833
  /// \param AssociatedStmt Statement, associated with the directive.
3834
  /// \param Exprs Helper expressions for CodeGen.
3835
  ///
3836
  static OMPTaskLoopSimdDirective *
3837
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3838
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3839
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3840
3841
  /// Creates an empty directive with the place
3842
  /// for \a NumClauses clauses.
3843
  ///
3844
  /// \param C AST context.
3845
  /// \param CollapsedNum Number of collapsed nested loops.
3846
  /// \param NumClauses Number of clauses.
3847
  ///
3848
  static OMPTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
3849
                                               unsigned NumClauses,
3850
                                               unsigned CollapsedNum,
3851
                                               EmptyShell);
3852
3853
3.55k
  static bool classof(const Stmt *T) {
3854
3.55k
    return T->getStmtClass() == OMPTaskLoopSimdDirectiveClass;
3855
3.55k
  }
3856
};
3857
3858
/// This represents '#pragma omp master taskloop' directive.
3859
///
3860
/// \code
3861
/// #pragma omp master taskloop private(a,b) grainsize(val) num_tasks(num)
3862
/// \endcode
3863
/// In this example directive '#pragma omp master taskloop' has clauses
3864
/// 'private' with the variables 'a' and 'b', 'grainsize' with expression 'val'
3865
/// and 'num_tasks' with expression 'num'.
3866
///
3867
class OMPMasterTaskLoopDirective : public OMPLoopDirective {
3868
  friend class ASTStmtReader;
3869
  friend class OMPExecutableDirective;
3870
  /// true if the construct has inner cancel directive.
3871
  bool HasCancel = false;
3872
3873
  /// Build directive with the given start and end location.
3874
  ///
3875
  /// \param StartLoc Starting location of the directive kind.
3876
  /// \param EndLoc Ending location of the directive.
3877
  /// \param CollapsedNum Number of collapsed nested loops.
3878
  ///
3879
  OMPMasterTaskLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3880
                             unsigned CollapsedNum)
3881
6.12k
      : OMPLoopDirective(OMPMasterTaskLoopDirectiveClass,
3882
6.12k
                         llvm::omp::OMPD_master_taskloop, StartLoc, EndLoc,
3883
6.12k
                         CollapsedNum) {}
3884
3885
  /// Build an empty directive.
3886
  ///
3887
  /// \param CollapsedNum Number of collapsed nested loops.
3888
  ///
3889
  explicit OMPMasterTaskLoopDirective(unsigned CollapsedNum)
3890
36
      : OMPLoopDirective(OMPMasterTaskLoopDirectiveClass,
3891
36
                         llvm::omp::OMPD_master_taskloop, SourceLocation(),
3892
36
                         SourceLocation(), CollapsedNum) {}
3893
3894
  /// Set cancel state.
3895
6.15k
  void setHasCancel(bool Has) { HasCancel = Has; }
3896
3897
public:
3898
  /// Creates directive with a list of \a Clauses.
3899
  ///
3900
  /// \param C AST context.
3901
  /// \param StartLoc Starting location of the directive kind.
3902
  /// \param EndLoc Ending Location of the directive.
3903
  /// \param CollapsedNum Number of collapsed loops.
3904
  /// \param Clauses List of clauses.
3905
  /// \param AssociatedStmt Statement, associated with the directive.
3906
  /// \param Exprs Helper expressions for CodeGen.
3907
  /// \param HasCancel true if this directive has inner cancel directive.
3908
  ///
3909
  static OMPMasterTaskLoopDirective *
3910
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3911
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3912
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3913
3914
  /// Creates an empty directive with the place
3915
  /// for \a NumClauses clauses.
3916
  ///
3917
  /// \param C AST context.
3918
  /// \param CollapsedNum Number of collapsed nested loops.
3919
  /// \param NumClauses Number of clauses.
3920
  ///
3921
  static OMPMasterTaskLoopDirective *CreateEmpty(const ASTContext &C,
3922
                                                 unsigned NumClauses,
3923
                                                 unsigned CollapsedNum,
3924
                                                 EmptyShell);
3925
3926
  /// Return true if current directive has inner cancel directive.
3927
71
  bool hasCancel() const { return HasCancel; }
3928
3929
3.86k
  static bool classof(const Stmt *T) {
3930
3.86k
    return T->getStmtClass() == OMPMasterTaskLoopDirectiveClass;
3931
3.86k
  }
3932
};
3933
3934
/// This represents '#pragma omp masked taskloop' directive.
3935
///
3936
/// \code
3937
/// #pragma omp masked taskloop private(a,b) grainsize(val) num_tasks(num)
3938
/// \endcode
3939
/// In this example directive '#pragma omp masked taskloop' has clauses
3940
/// 'private' with the variables 'a' and 'b', 'grainsize' with expression 'val'
3941
/// and 'num_tasks' with expression 'num'.
3942
///
3943
class OMPMaskedTaskLoopDirective final : public OMPLoopDirective {
3944
  friend class ASTStmtReader;
3945
  friend class OMPExecutableDirective;
3946
  /// true if the construct has inner cancel directive.
3947
  bool HasCancel = false;
3948
3949
  /// Build directive with the given start and end location.
3950
  ///
3951
  /// \param StartLoc Starting location of the directive kind.
3952
  /// \param EndLoc Ending location of the directive.
3953
  /// \param CollapsedNum Number of collapsed nested loops.
3954
  ///
3955
  OMPMaskedTaskLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3956
                             unsigned CollapsedNum)
3957
3.27k
      : OMPLoopDirective(OMPMaskedTaskLoopDirectiveClass,
3958
3.27k
                         llvm::omp::OMPD_masked_taskloop, StartLoc, EndLoc,
3959
3.27k
                         CollapsedNum) {}
3960
3961
  /// Build an empty directive.
3962
  ///
3963
  /// \param CollapsedNum Number of collapsed nested loops.
3964
  ///
3965
  explicit OMPMaskedTaskLoopDirective(unsigned CollapsedNum)
3966
12
      : OMPLoopDirective(OMPMaskedTaskLoopDirectiveClass,
3967
12
                         llvm::omp::OMPD_masked_taskloop, SourceLocation(),
3968
12
                         SourceLocation(), CollapsedNum) {}
3969
3970
  /// Set cancel state.
3971
3.28k
  void setHasCancel(bool Has) { HasCancel = Has; }
3972
3973
public:
3974
  /// Creates directive with a list of \a Clauses.
3975
  ///
3976
  /// \param C AST context.
3977
  /// \param StartLoc Starting location of the directive kind.
3978
  /// \param EndLoc Ending Location of the directive.
3979
  /// \param CollapsedNum Number of collapsed loops.
3980
  /// \param Clauses List of clauses.
3981
  /// \param AssociatedStmt Statement, associated with the directive.
3982
  /// \param Exprs Helper expressions for CodeGen.
3983
  /// \param HasCancel true if this directive has inner cancel directive.
3984
  ///
3985
  static OMPMaskedTaskLoopDirective *
3986
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3987
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3988
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3989
3990
  /// Creates an empty directive with the place
3991
  /// for \a NumClauses clauses.
3992
  ///
3993
  /// \param C AST context.
3994
  /// \param CollapsedNum Number of collapsed nested loops.
3995
  /// \param NumClauses Number of clauses.
3996
  ///
3997
  static OMPMaskedTaskLoopDirective *CreateEmpty(const ASTContext &C,
3998
                                                 unsigned NumClauses,
3999
                                                 unsigned CollapsedNum,
4000
                                                 EmptyShell);
4001
4002
  /// Return true if current directive has inner cancel directive.
4003
12
  bool hasCancel() const { return HasCancel; }
4004
4005
1.57k
  static bool classof(const Stmt *T) {
4006
1.57k
    return T->getStmtClass() == OMPMaskedTaskLoopDirectiveClass;
4007
1.57k
  }
4008
};
4009
4010
/// This represents '#pragma omp master taskloop simd' directive.
4011
///
4012
/// \code
4013
/// #pragma omp master taskloop simd private(a,b) grainsize(val) num_tasks(num)
4014
/// \endcode
4015
/// In this example directive '#pragma omp master taskloop simd' has clauses
4016
/// 'private' with the variables 'a' and 'b', 'grainsize' with expression 'val'
4017
/// and 'num_tasks' with expression 'num'.
4018
///
4019
class OMPMasterTaskLoopSimdDirective : public OMPLoopDirective {
4020
  friend class ASTStmtReader;
4021
  friend class OMPExecutableDirective;
4022
  /// Build directive with the given start and end location.
4023
  ///
4024
  /// \param StartLoc Starting location of the directive kind.
4025
  /// \param EndLoc Ending location of the directive.
4026
  /// \param CollapsedNum Number of collapsed nested loops.
4027
  ///
4028
  OMPMasterTaskLoopSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
4029
                                 unsigned CollapsedNum)
4030
7.15k
      : OMPLoopDirective(OMPMasterTaskLoopSimdDirectiveClass,
4031
7.15k
                         llvm::omp::OMPD_master_taskloop_simd, StartLoc, EndLoc,
4032
7.15k
                         CollapsedNum) {}
4033
4034
  /// Build an empty directive.
4035
  ///
4036
  /// \param CollapsedNum Number of collapsed nested loops.
4037
  ///
4038
  explicit OMPMasterTaskLoopSimdDirective(unsigned CollapsedNum)
4039
50
      : OMPLoopDirective(OMPMasterTaskLoopSimdDirectiveClass,
4040
50
                         llvm::omp::OMPD_master_taskloop_simd, SourceLocation(),
4041
50
                         SourceLocation(), CollapsedNum) {}
4042
4043
public:
4044
  /// Creates directive with a list of \p Clauses.
4045
  ///
4046
  /// \param C AST context.
4047
  /// \param StartLoc Starting location of the directive kind.
4048
  /// \param EndLoc Ending Location of the directive.
4049
  /// \param CollapsedNum Number of collapsed loops.
4050
  /// \param Clauses List of clauses.
4051
  /// \param AssociatedStmt Statement, associated with the directive.
4052
  /// \param Exprs Helper expressions for CodeGen.
4053
  ///
4054
  static OMPMasterTaskLoopSimdDirective *
4055
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4056
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4057
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4058
4059
  /// Creates an empty directive with the place for \p NumClauses clauses.
4060
  ///
4061
  /// \param C AST context.
4062
  /// \param CollapsedNum Number of collapsed nested loops.
4063
  /// \param NumClauses Number of clauses.
4064
  ///
4065
  static OMPMasterTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
4066
                                                     unsigned NumClauses,
4067
                                                     unsigned CollapsedNum,
4068
                                                     EmptyShell);
4069
4070
3.55k
  static bool classof(const Stmt *T) {
4071
3.55k
    return T->getStmtClass() == OMPMasterTaskLoopSimdDirectiveClass;
4072
3.55k
  }
4073
};
4074
4075
/// This represents '#pragma omp masked taskloop simd' directive.
4076
///
4077
/// \code
4078
/// #pragma omp masked taskloop simd private(a,b) grainsize(val) num_tasks(num)
4079
/// \endcode
4080
/// In this example directive '#pragma omp masked taskloop simd' has clauses
4081
/// 'private' with the variables 'a' and 'b', 'grainsize' with expression 'val'
4082
/// and 'num_tasks' with expression 'num'.
4083
///
4084
class OMPMaskedTaskLoopSimdDirective final : public OMPLoopDirective {
4085
  friend class ASTStmtReader;
4086
  friend class OMPExecutableDirective;
4087
  /// Build directive with the given start and end location.
4088
  ///
4089
  /// \param StartLoc Starting location of the directive kind.
4090
  /// \param EndLoc Ending location of the directive.
4091
  /// \param CollapsedNum Number of collapsed nested loops.
4092
  ///
4093
  OMPMaskedTaskLoopSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
4094
                                 unsigned CollapsedNum)
4095
6.35k
      : OMPLoopDirective(OMPMaskedTaskLoopSimdDirectiveClass,
4096
6.35k
                         llvm::omp::OMPD_masked_taskloop_simd, StartLoc, EndLoc,
4097
6.35k
                         CollapsedNum) {}
4098
4099
  /// Build an empty directive.
4100
  ///
4101
  /// \param CollapsedNum Number of collapsed nested loops.
4102
  ///
4103
  explicit OMPMaskedTaskLoopSimdDirective(unsigned CollapsedNum)
4104
20
      : OMPLoopDirective(OMPMaskedTaskLoopSimdDirectiveClass,
4105
20
                         llvm::omp::OMPD_masked_taskloop_simd, SourceLocation(),
4106
20
                         SourceLocation(), CollapsedNum) {}
4107
4108
public:
4109
  /// Creates directive with a list of \p Clauses.
4110
  ///
4111
  /// \param C AST context.
4112
  /// \param StartLoc Starting location of the directive kind.
4113
  /// \param EndLoc Ending Location of the directive.
4114
  /// \param CollapsedNum Number of collapsed loops.
4115
  /// \param Clauses List of clauses.
4116
  /// \param AssociatedStmt Statement, associated with the directive.
4117
  /// \param Exprs Helper expressions for CodeGen.
4118
  ///
4119
  static OMPMaskedTaskLoopSimdDirective *
4120
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4121
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4122
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4123
4124
  /// Creates an empty directive with the place for \p NumClauses clauses.
4125
  ///
4126
  /// \param C AST context.
4127
  /// \param CollapsedNum Number of collapsed nested loops.
4128
  /// \param NumClauses Number of clauses.
4129
  ///
4130
  static OMPMaskedTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
4131
                                                     unsigned NumClauses,
4132
                                                     unsigned CollapsedNum,
4133
                                                     EmptyShell);
4134
4135
3.25k
  static bool classof(const Stmt *T) {
4136
3.25k
    return T->getStmtClass() == OMPMaskedTaskLoopSimdDirectiveClass;
4137
3.25k
  }
4138
};
4139
4140
/// This represents '#pragma omp parallel master taskloop' directive.
4141
///
4142
/// \code
4143
/// #pragma omp parallel master taskloop private(a,b) grainsize(val)
4144
/// num_tasks(num)
4145
/// \endcode
4146
/// In this example directive '#pragma omp parallel master taskloop' has clauses
4147
/// 'private' with the variables 'a' and 'b', 'grainsize' with expression 'val'
4148
/// and 'num_tasks' with expression 'num'.
4149
///
4150
class OMPParallelMasterTaskLoopDirective : public OMPLoopDirective {
4151
  friend class ASTStmtReader;
4152
  friend class OMPExecutableDirective;
4153
  /// true if the construct has inner cancel directive.
4154
  bool HasCancel = false;
4155
4156
  /// Build directive with the given start and end location.
4157
  ///
4158
  /// \param StartLoc Starting location of the directive kind.
4159
  /// \param EndLoc Ending location of the directive.
4160
  /// \param CollapsedNum Number of collapsed nested loops.
4161
  ///
4162
  OMPParallelMasterTaskLoopDirective(SourceLocation StartLoc,
4163
                                     SourceLocation EndLoc,
4164
                                     unsigned CollapsedNum)
4165
4.16k
      : OMPLoopDirective(OMPParallelMasterTaskLoopDirectiveClass,
4166
4.16k
                         llvm::omp::OMPD_parallel_master_taskloop, StartLoc,
4167
4.16k
                         EndLoc, CollapsedNum) {}
4168
4169
  /// Build an empty directive.
4170
  ///
4171
  /// \param CollapsedNum Number of collapsed nested loops.
4172
  ///
4173
  explicit OMPParallelMasterTaskLoopDirective(unsigned CollapsedNum)
4174
34
      : OMPLoopDirective(OMPParallelMasterTaskLoopDirectiveClass,
4175
34
                         llvm::omp::OMPD_parallel_master_taskloop,
4176
34
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
4177
4178
  /// Set cancel state.
4179
4.20k
  void setHasCancel(bool Has) { HasCancel = Has; }
4180
4181
public:
4182
  /// Creates directive with a list of \a Clauses.
4183
  ///
4184
  /// \param C AST context.
4185
  /// \param StartLoc Starting location of the directive kind.
4186
  /// \param EndLoc Ending Location of the directive.
4187
  /// \param CollapsedNum Number of collapsed loops.
4188
  /// \param Clauses List of clauses.
4189
  /// \param AssociatedStmt Statement, associated with the directive.
4190
  /// \param Exprs Helper expressions for CodeGen.
4191
  /// \param HasCancel true if this directive has inner cancel directive.
4192
  ///
4193
  static OMPParallelMasterTaskLoopDirective *
4194
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4195
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4196
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
4197
4198
  /// Creates an empty directive with the place
4199
  /// for \a NumClauses clauses.
4200
  ///
4201
  /// \param C AST context.
4202
  /// \param CollapsedNum Number of collapsed nested loops.
4203
  /// \param NumClauses Number of clauses.
4204
  ///
4205
  static OMPParallelMasterTaskLoopDirective *CreateEmpty(const ASTContext &C,
4206
                                                         unsigned NumClauses,
4207
                                                         unsigned CollapsedNum,
4208
                                                         EmptyShell);
4209
4210
  /// Return true if current directive has inner cancel directive.
4211
67
  bool hasCancel() const { return HasCancel; }
4212
4213
2.70k
  static bool classof(const Stmt *T) {
4214
2.70k
    return T->getStmtClass() == OMPParallelMasterTaskLoopDirectiveClass;
4215
2.70k
  }
4216
};
4217
4218
/// This represents '#pragma omp parallel masked taskloop' directive.
4219
///
4220
/// \code
4221
/// #pragma omp parallel masked taskloop private(a,b) grainsize(val)
4222
/// num_tasks(num)
4223
/// \endcode
4224
/// In this example directive '#pragma omp parallel masked taskloop' has clauses
4225
/// 'private' with the variables 'a' and 'b', 'grainsize' with expression 'val'
4226
/// and 'num_tasks' with expression 'num'.
4227
///
4228
class OMPParallelMaskedTaskLoopDirective final : public OMPLoopDirective {
4229
  friend class ASTStmtReader;
4230
  friend class OMPExecutableDirective;
4231
  /// true if the construct has inner cancel directive.
4232
  bool HasCancel = false;
4233
4234
  /// Build directive with the given start and end location.
4235
  ///
4236
  /// \param StartLoc Starting location of the directive kind.
4237
  /// \param EndLoc Ending location of the directive.
4238
  /// \param CollapsedNum Number of collapsed nested loops.
4239
  ///
4240
  OMPParallelMaskedTaskLoopDirective(SourceLocation StartLoc,
4241
                                     SourceLocation EndLoc,
4242
                                     unsigned CollapsedNum)
4243
3.87k
      : OMPLoopDirective(OMPParallelMaskedTaskLoopDirectiveClass,
4244
3.87k
                         llvm::omp::OMPD_parallel_masked_taskloop, StartLoc,
4245
3.87k
                         EndLoc, CollapsedNum) {}
4246
4247
  /// Build an empty directive.
4248
  ///
4249
  /// \param CollapsedNum Number of collapsed nested loops.
4250
  ///
4251
  explicit OMPParallelMaskedTaskLoopDirective(unsigned CollapsedNum)
4252
12
      : OMPLoopDirective(OMPParallelMaskedTaskLoopDirectiveClass,
4253
12
                         llvm::omp::OMPD_parallel_masked_taskloop,
4254
12
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
4255
4256
  /// Set cancel state.
4257
3.88k
  void setHasCancel(bool Has) { HasCancel = Has; }
4258
4259
public:
4260
  /// Creates directive with a list of \a Clauses.
4261
  ///
4262
  /// \param C AST context.
4263
  /// \param StartLoc Starting location of the directive kind.
4264
  /// \param EndLoc Ending Location of the directive.
4265
  /// \param CollapsedNum Number of collapsed loops.
4266
  /// \param Clauses List of clauses.
4267
  /// \param AssociatedStmt Statement, associated with the directive.
4268
  /// \param Exprs Helper expressions for CodeGen.
4269
  /// \param HasCancel true if this directive has inner cancel directive.
4270
  ///
4271
  static OMPParallelMaskedTaskLoopDirective *
4272
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4273
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4274
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
4275
4276
  /// Creates an empty directive with the place
4277
  /// for \a NumClauses clauses.
4278
  ///
4279
  /// \param C AST context.
4280
  /// \param CollapsedNum Number of collapsed nested loops.
4281
  /// \param NumClauses Number of clauses.
4282
  ///
4283
  static OMPParallelMaskedTaskLoopDirective *CreateEmpty(const ASTContext &C,
4284
                                                         unsigned NumClauses,
4285
                                                         unsigned CollapsedNum,
4286
                                                         EmptyShell);
4287
4288
  /// Return true if current directive has inner cancel directive.
4289
12
  bool hasCancel() const { return HasCancel; }
4290
4291
1.92k
  static bool classof(const Stmt *T) {
4292
1.92k
    return T->getStmtClass() == OMPParallelMaskedTaskLoopDirectiveClass;
4293
1.92k
  }
4294
};
4295
4296
/// This represents '#pragma omp parallel master taskloop simd' directive.
4297
///
4298
/// \code
4299
/// #pragma omp parallel master taskloop simd private(a,b) grainsize(val)
4300
/// num_tasks(num)
4301
/// \endcode
4302
/// In this example directive '#pragma omp parallel master taskloop simd' has
4303
/// clauses 'private' with the variables 'a' and 'b', 'grainsize' with
4304
/// expression 'val' and 'num_tasks' with expression 'num'.
4305
///
4306
class OMPParallelMasterTaskLoopSimdDirective : public OMPLoopDirective {
4307
  friend class ASTStmtReader;
4308
  friend class OMPExecutableDirective;
4309
  /// Build directive with the given start and end location.
4310
  ///
4311
  /// \param StartLoc Starting location of the directive kind.
4312
  /// \param EndLoc Ending location of the directive.
4313
  /// \param CollapsedNum Number of collapsed nested loops.
4314
  ///
4315
  OMPParallelMasterTaskLoopSimdDirective(SourceLocation StartLoc,
4316
                                         SourceLocation EndLoc,
4317
                                         unsigned CollapsedNum)
4318
5.22k
      : OMPLoopDirective(OMPParallelMasterTaskLoopSimdDirectiveClass,
4319
5.22k
                         llvm::omp::OMPD_parallel_master_taskloop_simd,
4320
5.22k
                         StartLoc, EndLoc, CollapsedNum) {}
4321
4322
  /// Build an empty directive.
4323
  ///
4324
  /// \param CollapsedNum Number of collapsed nested loops.
4325
  ///
4326
  explicit OMPParallelMasterTaskLoopSimdDirective(unsigned CollapsedNum)
4327
48
      : OMPLoopDirective(OMPParallelMasterTaskLoopSimdDirectiveClass,
4328
48
                         llvm::omp::OMPD_parallel_master_taskloop_simd,
4329
48
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
4330
4331
public:
4332
  /// Creates directive with a list of \p Clauses.
4333
  ///
4334
  /// \param C AST context.
4335
  /// \param StartLoc Starting location of the directive kind.
4336
  /// \param EndLoc Ending Location of the directive.
4337
  /// \param CollapsedNum Number of collapsed loops.
4338
  /// \param Clauses List of clauses.
4339
  /// \param AssociatedStmt Statement, associated with the directive.
4340
  /// \param Exprs Helper expressions for CodeGen.
4341
  ///
4342
  static OMPParallelMasterTaskLoopSimdDirective *
4343
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4344
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4345
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4346
4347
  /// Creates an empty directive with the place
4348
  /// for \a NumClauses clauses.
4349
  ///
4350
  /// \param C AST context.
4351
  /// \param CollapsedNum Number of collapsed nested loops.
4352
  /// \param NumClauses Number of clauses.
4353
  ///
4354
  static OMPParallelMasterTaskLoopSimdDirective *
4355
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
4356
              EmptyShell);
4357
4358
2.44k
  static bool classof(const Stmt *T) {
4359
2.44k
    return T->getStmtClass() == OMPParallelMasterTaskLoopSimdDirectiveClass;
4360
2.44k
  }
4361
};
4362
4363
/// This represents '#pragma omp parallel masked taskloop simd' directive.
4364
///
4365
/// \code
4366
/// #pragma omp parallel masked taskloop simd private(a,b) grainsize(val)
4367
/// num_tasks(num)
4368
/// \endcode
4369
/// In this example directive '#pragma omp parallel masked taskloop simd' has
4370
/// clauses 'private' with the variables 'a' and 'b', 'grainsize' with
4371
/// expression 'val' and 'num_tasks' with expression 'num'.
4372
///
4373
class OMPParallelMaskedTaskLoopSimdDirective final : public OMPLoopDirective {
4374
  friend class ASTStmtReader;
4375
  friend class OMPExecutableDirective;
4376
  /// Build directive with the given start and end location.
4377
  ///
4378
  /// \param StartLoc Starting location of the directive kind.
4379
  /// \param EndLoc Ending location of the directive.
4380
  /// \param CollapsedNum Number of collapsed nested loops.
4381
  ///
4382
  OMPParallelMaskedTaskLoopSimdDirective(SourceLocation StartLoc,
4383
                                         SourceLocation EndLoc,
4384
                                         unsigned CollapsedNum)
4385
4.82k
      : OMPLoopDirective(OMPParallelMaskedTaskLoopSimdDirectiveClass,
4386
4.82k
                         llvm::omp::OMPD_parallel_masked_taskloop_simd,
4387
4.82k
                         StartLoc, EndLoc, CollapsedNum) {}
4388
4389
  /// Build an empty directive.
4390
  ///
4391
  /// \param CollapsedNum Number of collapsed nested loops.
4392
  ///
4393
  explicit OMPParallelMaskedTaskLoopSimdDirective(unsigned CollapsedNum)
4394
12
      : OMPLoopDirective(OMPParallelMaskedTaskLoopSimdDirectiveClass,
4395
12
                         llvm::omp::OMPD_parallel_masked_taskloop_simd,
4396
12
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
4397
4398
public:
4399
  /// Creates directive with a list of \p Clauses.
4400
  ///
4401
  /// \param C AST context.
4402
  /// \param StartLoc Starting location of the directive kind.
4403
  /// \param EndLoc Ending Location of the directive.
4404
  /// \param CollapsedNum Number of collapsed loops.
4405
  /// \param Clauses List of clauses.
4406
  /// \param AssociatedStmt Statement, associated with the directive.
4407
  /// \param Exprs Helper expressions for CodeGen.
4408
  ///
4409
  static OMPParallelMaskedTaskLoopSimdDirective *
4410
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4411
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4412
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4413
4414
  /// Creates an empty directive with the place
4415
  /// for \a NumClauses clauses.
4416
  ///
4417
  /// \param C AST context.
4418
  /// \param CollapsedNum Number of collapsed nested loops.
4419
  /// \param NumClauses Number of clauses.
4420
  ///
4421
  static OMPParallelMaskedTaskLoopSimdDirective *
4422
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
4423
              EmptyShell);
4424
4425
2.37k
  static bool classof(const Stmt *T) {
4426
2.37k
    return T->getStmtClass() == OMPParallelMaskedTaskLoopSimdDirectiveClass;
4427
2.37k
  }
4428
};
4429
4430
/// This represents '#pragma omp distribute' directive.
4431
///
4432
/// \code
4433
/// #pragma omp distribute private(a,b)
4434
/// \endcode
4435
/// In this example directive '#pragma omp distribute' has clauses 'private'
4436
/// with the variables 'a' and 'b'
4437
///
4438
class OMPDistributeDirective : public OMPLoopDirective {
4439
  friend class ASTStmtReader;
4440
  friend class OMPExecutableDirective;
4441
4442
  /// Build directive with the given start and end location.
4443
  ///
4444
  /// \param StartLoc Starting location of the directive kind.
4445
  /// \param EndLoc Ending location of the directive.
4446
  /// \param CollapsedNum Number of collapsed nested loops.
4447
  ///
4448
  OMPDistributeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
4449
                         unsigned CollapsedNum)
4450
2.09k
      : OMPLoopDirective(OMPDistributeDirectiveClass,
4451
2.09k
                         llvm::omp::OMPD_distribute, StartLoc, EndLoc,
4452
2.09k
                         CollapsedNum) {}
4453
4454
  /// Build an empty directive.
4455
  ///
4456
  /// \param CollapsedNum Number of collapsed nested loops.
4457
  ///
4458
  explicit OMPDistributeDirective(unsigned CollapsedNum)
4459
147
      : OMPLoopDirective(OMPDistributeDirectiveClass,
4460
147
                         llvm::omp::OMPD_distribute, SourceLocation(),
4461
147
                         SourceLocation(), CollapsedNum) {}
4462
4463
public:
4464
  /// Creates directive with a list of \a Clauses.
4465
  ///
4466
  /// \param C AST context.
4467
  /// \param StartLoc Starting location of the directive kind.
4468
  /// \param EndLoc Ending Location of the directive.
4469
  /// \param CollapsedNum Number of collapsed loops.
4470
  /// \param Clauses List of clauses.
4471
  /// \param AssociatedStmt Statement, associated with the directive.
4472
  /// \param Exprs Helper expressions for CodeGen.
4473
  ///
4474
  static OMPDistributeDirective *
4475
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4476
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4477
         Stmt *AssociatedStmt, const HelperExprs &Exprs,
4478
         OpenMPDirectiveKind ParamPrevMappedDirective);
4479
4480
  /// Creates an empty directive with the place
4481
  /// for \a NumClauses clauses.
4482
  ///
4483
  /// \param C AST context.
4484
  /// \param CollapsedNum Number of collapsed nested loops.
4485
  /// \param NumClauses Number of clauses.
4486
  ///
4487
  static OMPDistributeDirective *CreateEmpty(const ASTContext &C,
4488
                                             unsigned NumClauses,
4489
                                             unsigned CollapsedNum, EmptyShell);
4490
4491
839
  static bool classof(const Stmt *T) {
4492
839
    return T->getStmtClass() == OMPDistributeDirectiveClass;
4493
839
  }
4494
};
4495
4496
/// This represents '#pragma omp target update' directive.
4497
///
4498
/// \code
4499
/// #pragma omp target update to(a) from(b) device(1)
4500
/// \endcode
4501
/// In this example directive '#pragma omp target update' has clause 'to' with
4502
/// argument 'a', clause 'from' with argument 'b' and clause 'device' with
4503
/// argument '1'.
4504
///
4505
class OMPTargetUpdateDirective : public OMPExecutableDirective {
4506
  friend class ASTStmtReader;
4507
  friend class OMPExecutableDirective;
4508
  /// Build directive with the given start and end location.
4509
  ///
4510
  /// \param StartLoc Starting location of the directive kind.
4511
  /// \param EndLoc Ending Location of the directive.
4512
  ///
4513
  OMPTargetUpdateDirective(SourceLocation StartLoc, SourceLocation EndLoc)
4514
3.66k
      : OMPExecutableDirective(OMPTargetUpdateDirectiveClass,
4515
3.66k
                               llvm::omp::OMPD_target_update, StartLoc,
4516
3.66k
                               EndLoc) {}
4517
4518
  /// Build an empty directive.
4519
  ///
4520
  explicit OMPTargetUpdateDirective()
4521
406
      : OMPExecutableDirective(OMPTargetUpdateDirectiveClass,
4522
406
                               llvm::omp::OMPD_target_update, SourceLocation(),
4523
406
                               SourceLocation()) {}
4524
4525
public:
4526
  /// Creates directive with a list of \a Clauses.
4527
  ///
4528
  /// \param C AST context.
4529
  /// \param StartLoc Starting location of the directive kind.
4530
  /// \param EndLoc Ending Location of the directive.
4531
  /// \param Clauses List of clauses.
4532
  /// \param AssociatedStmt Statement, associated with the directive.
4533
  ///
4534
  static OMPTargetUpdateDirective *
4535
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4536
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
4537
4538
  /// Creates an empty directive with the place for \a NumClauses
4539
  /// clauses.
4540
  ///
4541
  /// \param C AST context.
4542
  /// \param NumClauses The number of clauses.
4543
  ///
4544
  static OMPTargetUpdateDirective *CreateEmpty(const ASTContext &C,
4545
                                               unsigned NumClauses, EmptyShell);
4546
4547
47.1k
  static bool classof(const Stmt *T) {
4548
47.1k
    return T->getStmtClass() == OMPTargetUpdateDirectiveClass;
4549
47.1k
  }
4550
};
4551
4552
/// This represents '#pragma omp distribute parallel for' composite
4553
///  directive.
4554
///
4555
/// \code
4556
/// #pragma omp distribute parallel for private(a,b)
4557
/// \endcode
4558
/// In this example directive '#pragma omp distribute parallel for' has clause
4559
/// 'private' with the variables 'a' and 'b'
4560
///
4561
class OMPDistributeParallelForDirective : public OMPLoopDirective {
4562
  friend class ASTStmtReader;
4563
  friend class OMPExecutableDirective;
4564
  /// true if the construct has inner cancel directive.
4565
  bool HasCancel = false;
4566
4567
  /// Build directive with the given start and end location.
4568
  ///
4569
  /// \param StartLoc Starting location of the directive kind.
4570
  /// \param EndLoc Ending location of the directive.
4571
  /// \param CollapsedNum Number of collapsed nested loops.
4572
  ///
4573
  OMPDistributeParallelForDirective(SourceLocation StartLoc,
4574
                                    SourceLocation EndLoc,
4575
                                    unsigned CollapsedNum)
4576
6.66k
      : OMPLoopDirective(OMPDistributeParallelForDirectiveClass,
4577
6.66k
                         llvm::omp::OMPD_distribute_parallel_for, StartLoc,
4578
6.66k
                         EndLoc, CollapsedNum) {}
4579
4580
  /// Build an empty directive.
4581
  ///
4582
  /// \param CollapsedNum Number of collapsed nested loops.
4583
  ///
4584
  explicit OMPDistributeParallelForDirective(unsigned CollapsedNum)
4585
300
      : OMPLoopDirective(OMPDistributeParallelForDirectiveClass,
4586
300
                         llvm::omp::OMPD_distribute_parallel_for,
4587
300
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
4588
4589
  /// Sets special task reduction descriptor.
4590
6.66k
  void setTaskReductionRefExpr(Expr *E) {
4591
6.66k
    Data->getChildren()[numLoopChildren(
4592
6.66k
        getLoopsNumber(), llvm::omp::OMPD_distribute_parallel_for)] = E;
4593
6.66k
  }
4594
4595
  /// Set cancel state.
4596
300
  void setHasCancel(bool Has) { HasCancel = Has; }
4597
4598
public:
4599
  /// Creates directive with a list of \a Clauses.
4600
  ///
4601
  /// \param C AST context.
4602
  /// \param StartLoc Starting location of the directive kind.
4603
  /// \param EndLoc Ending Location of the directive.
4604
  /// \param CollapsedNum Number of collapsed loops.
4605
  /// \param Clauses List of clauses.
4606
  /// \param AssociatedStmt Statement, associated with the directive.
4607
  /// \param Exprs Helper expressions for CodeGen.
4608
  /// \param TaskRedRef Task reduction special reference expression to handle
4609
  /// taskgroup descriptor.
4610
  /// \param HasCancel true if this directive has inner cancel directive.
4611
  ///
4612
  static OMPDistributeParallelForDirective *
4613
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4614
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4615
         Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
4616
         bool HasCancel);
4617
4618
  /// Creates an empty directive with the place
4619
  /// for \a NumClauses clauses.
4620
  ///
4621
  /// \param C AST context.
4622
  /// \param CollapsedNum Number of collapsed nested loops.
4623
  /// \param NumClauses Number of clauses.
4624
  ///
4625
  static OMPDistributeParallelForDirective *CreateEmpty(const ASTContext &C,
4626
                                                        unsigned NumClauses,
4627
                                                        unsigned CollapsedNum,
4628
                                                        EmptyShell);
4629
4630
  /// Returns special task reduction reference expression.
4631
2
  Expr *getTaskReductionRefExpr() {
4632
2
    return cast_or_null<Expr>(Data->getChildren()[numLoopChildren(
4633
2
        getLoopsNumber(), llvm::omp::OMPD_distribute_parallel_for)]);
4634
2
  }
4635
2
  const Expr *getTaskReductionRefExpr() const {
4636
2
    return const_cast<OMPDistributeParallelForDirective *>(this)
4637
2
        ->getTaskReductionRefExpr();
4638
2
  }
4639
4640
  /// Return true if current directive has inner cancel directive.
4641
1.00k
  bool hasCancel() const { return HasCancel; }
4642
4643
13.9k
  static bool classof(const Stmt *T) {
4644
13.9k
    return T->getStmtClass() == OMPDistributeParallelForDirectiveClass;
4645
13.9k
  }
4646
};
4647
4648
/// This represents '#pragma omp distribute parallel for simd' composite
4649
/// directive.
4650
///
4651
/// \code
4652
/// #pragma omp distribute parallel for simd private(x)
4653
/// \endcode
4654
/// In this example directive '#pragma omp distribute parallel for simd' has
4655
/// clause 'private' with the variables 'x'
4656
///
4657
class OMPDistributeParallelForSimdDirective final : public OMPLoopDirective {
4658
  friend class ASTStmtReader;
4659
  friend class OMPExecutableDirective;
4660
4661
  /// Build directive with the given start and end location.
4662
  ///
4663
  /// \param StartLoc Starting location of the directive kind.
4664
  /// \param EndLoc Ending location of the directive.
4665
  /// \param CollapsedNum Number of collapsed nested loops.
4666
  ///
4667
  OMPDistributeParallelForSimdDirective(SourceLocation StartLoc,
4668
                                        SourceLocation EndLoc,
4669
                                        unsigned CollapsedNum)
4670
7.94k
      : OMPLoopDirective(OMPDistributeParallelForSimdDirectiveClass,
4671
7.94k
                         llvm::omp::OMPD_distribute_parallel_for_simd, StartLoc,
4672
7.94k
                         EndLoc, CollapsedNum) {}
4673
4674
  /// Build an empty directive.
4675
  ///
4676
  /// \param CollapsedNum Number of collapsed nested loops.
4677
  ///
4678
  explicit OMPDistributeParallelForSimdDirective(unsigned CollapsedNum)
4679
280
      : OMPLoopDirective(OMPDistributeParallelForSimdDirectiveClass,
4680
280
                         llvm::omp::OMPD_distribute_parallel_for_simd,
4681
280
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
4682
4683
public:
4684
  /// Creates directive with a list of \a Clauses.
4685
  ///
4686
  /// \param C AST context.
4687
  /// \param StartLoc Starting location of the directive kind.
4688
  /// \param EndLoc Ending Location of the directive.
4689
  /// \param CollapsedNum Number of collapsed loops.
4690
  /// \param Clauses List of clauses.
4691
  /// \param AssociatedStmt Statement, associated with the directive.
4692
  /// \param Exprs Helper expressions for CodeGen.
4693
  ///
4694
  static OMPDistributeParallelForSimdDirective *Create(
4695
      const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4696
      unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4697
      Stmt *AssociatedStmt, const HelperExprs &Exprs);
4698
4699
  /// Creates an empty directive with the place for \a NumClauses clauses.
4700
  ///
4701
  /// \param C AST context.
4702
  /// \param CollapsedNum Number of collapsed nested loops.
4703
  /// \param NumClauses Number of clauses.
4704
  ///
4705
  static OMPDistributeParallelForSimdDirective *CreateEmpty(
4706
      const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
4707
      EmptyShell);
4708
4709
3.47k
  static bool classof(const Stmt *T) {
4710
3.47k
    return T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass;
4711
3.47k
  }
4712
};
4713
4714
/// This represents '#pragma omp distribute simd' composite directive.
4715
///
4716
/// \code
4717
/// #pragma omp distribute simd private(x)
4718
/// \endcode
4719
/// In this example directive '#pragma omp distribute simd' has clause
4720
/// 'private' with the variables 'x'
4721
///
4722
class OMPDistributeSimdDirective final : public OMPLoopDirective {
4723
  friend class ASTStmtReader;
4724
  friend class OMPExecutableDirective;
4725
4726
  /// Build directive with the given start and end location.
4727
  ///
4728
  /// \param StartLoc Starting location of the directive kind.
4729
  /// \param EndLoc Ending location of the directive.
4730
  /// \param CollapsedNum Number of collapsed nested loops.
4731
  ///
4732
  OMPDistributeSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
4733
                             unsigned CollapsedNum)
4734
6.39k
      : OMPLoopDirective(OMPDistributeSimdDirectiveClass,
4735
6.39k
                         llvm::omp::OMPD_distribute_simd, StartLoc, EndLoc,
4736
6.39k
                         CollapsedNum) {}
4737
4738
  /// Build an empty directive.
4739
  ///
4740
  /// \param CollapsedNum Number of collapsed nested loops.
4741
  ///
4742
  explicit OMPDistributeSimdDirective(unsigned CollapsedNum)
4743
202
      : OMPLoopDirective(OMPDistributeSimdDirectiveClass,
4744
202
                         llvm::omp::OMPD_distribute_simd, SourceLocation(),
4745
202
                         SourceLocation(), CollapsedNum) {}
4746
4747
public:
4748
  /// Creates directive with a list of \a Clauses.
4749
  ///
4750
  /// \param C AST context.
4751
  /// \param StartLoc Starting location of the directive kind.
4752
  /// \param EndLoc Ending Location of the directive.
4753
  /// \param CollapsedNum Number of collapsed loops.
4754
  /// \param Clauses List of clauses.
4755
  /// \param AssociatedStmt Statement, associated with the directive.
4756
  /// \param Exprs Helper expressions for CodeGen.
4757
  ///
4758
  static OMPDistributeSimdDirective *
4759
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4760
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4761
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4762
4763
  /// Creates an empty directive with the place for \a NumClauses clauses.
4764
  ///
4765
  /// \param C AST context.
4766
  /// \param CollapsedNum Number of collapsed nested loops.
4767
  /// \param NumClauses Number of clauses.
4768
  ///
4769
  static OMPDistributeSimdDirective *CreateEmpty(const ASTContext &C,
4770
                                                 unsigned NumClauses,
4771
                                                 unsigned CollapsedNum,
4772
                                                 EmptyShell);
4773
4774
2.65k
  static bool classof(const Stmt *T) {
4775
2.65k
    return T->getStmtClass() == OMPDistributeSimdDirectiveClass;
4776
2.65k
  }
4777
};
4778
4779
/// This represents '#pragma omp target parallel for simd' directive.
4780
///
4781
/// \code
4782
/// #pragma omp target parallel for simd private(a) map(b) safelen(c)
4783
/// \endcode
4784
/// In this example directive '#pragma omp target parallel for simd' has clauses
4785
/// 'private' with the variable 'a', 'map' with the variable 'b' and 'safelen'
4786
/// with the variable 'c'.
4787
///
4788
class OMPTargetParallelForSimdDirective final : public OMPLoopDirective {
4789
  friend class ASTStmtReader;
4790
  friend class OMPExecutableDirective;
4791
4792
  /// Build directive with the given start and end location.
4793
  ///
4794
  /// \param StartLoc Starting location of the directive kind.
4795
  /// \param EndLoc Ending location of the directive.
4796
  /// \param CollapsedNum Number of collapsed nested loops.
4797
  ///
4798
  OMPTargetParallelForSimdDirective(SourceLocation StartLoc,
4799
                                    SourceLocation EndLoc,
4800
                                    unsigned CollapsedNum)
4801
10.0k
      : OMPLoopDirective(OMPTargetParallelForSimdDirectiveClass,
4802
10.0k
                         llvm::omp::OMPD_target_parallel_for_simd, StartLoc,
4803
10.0k
                         EndLoc, CollapsedNum) {}
4804
4805
  /// Build an empty directive.
4806
  ///
4807
  /// \param CollapsedNum Number of collapsed nested loops.
4808
  ///
4809
  explicit OMPTargetParallelForSimdDirective(unsigned CollapsedNum)
4810
676
      : OMPLoopDirective(OMPTargetParallelForSimdDirectiveClass,
4811
676
                         llvm::omp::OMPD_target_parallel_for_simd,
4812
676
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
4813
4814
public:
4815
  /// Creates directive with a list of \a Clauses.
4816
  ///
4817
  /// \param C AST context.
4818
  /// \param StartLoc Starting location of the directive kind.
4819
  /// \param EndLoc Ending Location of the directive.
4820
  /// \param CollapsedNum Number of collapsed loops.
4821
  /// \param Clauses List of clauses.
4822
  /// \param AssociatedStmt Statement, associated with the directive.
4823
  /// \param Exprs Helper expressions for CodeGen.
4824
  ///
4825
  static OMPTargetParallelForSimdDirective *
4826
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4827
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4828
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4829
4830
  /// Creates an empty directive with the place for \a NumClauses clauses.
4831
  ///
4832
  /// \param C AST context.
4833
  /// \param CollapsedNum Number of collapsed nested loops.
4834
  /// \param NumClauses Number of clauses.
4835
  ///
4836
  static OMPTargetParallelForSimdDirective *CreateEmpty(const ASTContext &C,
4837
                                                        unsigned NumClauses,
4838
                                                        unsigned CollapsedNum,
4839
                                                        EmptyShell);
4840
4841
4.59k
  static bool classof(const Stmt *T) {
4842
4.59k
    return T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass;
4843
4.59k
  }
4844
};
4845
4846
/// This represents '#pragma omp target simd' directive.
4847
///
4848
/// \code
4849
/// #pragma omp target simd private(a) map(b) safelen(c)
4850
/// \endcode
4851
/// In this example directive '#pragma omp target simd' has clauses 'private'
4852
/// with the variable 'a', 'map' with the variable 'b' and 'safelen' with
4853
/// the variable 'c'.
4854
///
4855
class OMPTargetSimdDirective final : public OMPLoopDirective {
4856
  friend class ASTStmtReader;
4857
  friend class OMPExecutableDirective;
4858
4859
  /// Build directive with the given start and end location.
4860
  ///
4861
  /// \param StartLoc Starting location of the directive kind.
4862
  /// \param EndLoc Ending location of the directive.
4863
  /// \param CollapsedNum Number of collapsed nested loops.
4864
  ///
4865
  OMPTargetSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
4866
                         unsigned CollapsedNum)
4867
10.6k
      : OMPLoopDirective(OMPTargetSimdDirectiveClass,
4868
10.6k
                         llvm::omp::OMPD_target_simd, StartLoc, EndLoc,
4869
10.6k
                         CollapsedNum) {}
4870
4871
  /// Build an empty directive.
4872
  ///
4873
  /// \param CollapsedNum Number of collapsed nested loops.
4874
  ///
4875
  explicit OMPTargetSimdDirective(unsigned CollapsedNum)
4876
634
      : OMPLoopDirective(OMPTargetSimdDirectiveClass,
4877
634
                         llvm::omp::OMPD_target_simd, SourceLocation(),
4878
634
                         SourceLocation(), CollapsedNum) {}
4879
4880
public:
4881
  /// Creates directive with a list of \a Clauses.
4882
  ///
4883
  /// \param C AST context.
4884
  /// \param StartLoc Starting location of the directive kind.
4885
  /// \param EndLoc Ending Location of the directive.
4886
  /// \param CollapsedNum Number of collapsed loops.
4887
  /// \param Clauses List of clauses.
4888
  /// \param AssociatedStmt Statement, associated with the directive.
4889
  /// \param Exprs Helper expressions for CodeGen.
4890
  ///
4891
  static OMPTargetSimdDirective *
4892
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4893
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4894
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4895
4896
  /// Creates an empty directive with the place for \a NumClauses clauses.
4897
  ///
4898
  /// \param C AST context.
4899
  /// \param CollapsedNum Number of collapsed nested loops.
4900
  /// \param NumClauses Number of clauses.
4901
  ///
4902
  static OMPTargetSimdDirective *CreateEmpty(const ASTContext &C,
4903
                                             unsigned NumClauses,
4904
                                             unsigned CollapsedNum,
4905
                                             EmptyShell);
4906
4907
4.77k
  static bool classof(const Stmt *T) {
4908
4.77k
    return T->getStmtClass() == OMPTargetSimdDirectiveClass;
4909
4.77k
  }
4910
};
4911
4912
/// This represents '#pragma omp teams distribute' directive.
4913
///
4914
/// \code
4915
/// #pragma omp teams distribute private(a,b)
4916
/// \endcode
4917
/// In this example directive '#pragma omp teams distribute' has clauses
4918
/// 'private' with the variables 'a' and 'b'
4919
///
4920
class OMPTeamsDistributeDirective final : public OMPLoopDirective {
4921
  friend class ASTStmtReader;
4922
  friend class OMPExecutableDirective;
4923
4924
  /// Build directive with the given start and end location.
4925
  ///
4926
  /// \param StartLoc Starting location of the directive kind.
4927
  /// \param EndLoc Ending location of the directive.
4928
  /// \param CollapsedNum Number of collapsed nested loops.
4929
  ///
4930
  OMPTeamsDistributeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
4931
                              unsigned CollapsedNum)
4932
5.84k
      : OMPLoopDirective(OMPTeamsDistributeDirectiveClass,
4933
5.84k
                         llvm::omp::OMPD_teams_distribute, StartLoc, EndLoc,
4934
5.84k
                         CollapsedNum) {}
4935
4936
  /// Build an empty directive.
4937
  ///
4938
  /// \param CollapsedNum Number of collapsed nested loops.
4939
  ///
4940
  explicit OMPTeamsDistributeDirective(unsigned CollapsedNum)
4941
142
      : OMPLoopDirective(OMPTeamsDistributeDirectiveClass,
4942
142
                         llvm::omp::OMPD_teams_distribute, SourceLocation(),
4943
142
                         SourceLocation(), CollapsedNum) {}
4944
4945
public:
4946
  /// Creates directive with a list of \a Clauses.
4947
  ///
4948
  /// \param C AST context.
4949
  /// \param StartLoc Starting location of the directive kind.
4950
  /// \param EndLoc Ending Location of the directive.
4951
  /// \param CollapsedNum Number of collapsed loops.
4952
  /// \param Clauses List of clauses.
4953
  /// \param AssociatedStmt Statement, associated with the directive.
4954
  /// \param Exprs Helper expressions for CodeGen.
4955
  ///
4956
  static OMPTeamsDistributeDirective *
4957
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4958
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4959
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
4960
4961
  /// Creates an empty directive with the place for \a NumClauses clauses.
4962
  ///
4963
  /// \param C AST context.
4964
  /// \param CollapsedNum Number of collapsed nested loops.
4965
  /// \param NumClauses Number of clauses.
4966
  ///
4967
  static OMPTeamsDistributeDirective *CreateEmpty(const ASTContext &C,
4968
                                                  unsigned NumClauses,
4969
                                                  unsigned CollapsedNum,
4970
                                                  EmptyShell);
4971
4972
2.75k
  static bool classof(const Stmt *T) {
4973
2.75k
    return T->getStmtClass() == OMPTeamsDistributeDirectiveClass;
4974
2.75k
  }
4975
};
4976
4977
/// This represents '#pragma omp teams distribute simd'
4978
/// combined directive.
4979
///
4980
/// \code
4981
/// #pragma omp teams distribute simd private(a,b)
4982
/// \endcode
4983
/// In this example directive '#pragma omp teams distribute simd'
4984
/// has clause 'private' with the variables 'a' and 'b'
4985
///
4986
class OMPTeamsDistributeSimdDirective final : public OMPLoopDirective {
4987
  friend class ASTStmtReader;
4988
  friend class OMPExecutableDirective;
4989
4990
  /// Build directive with the given start and end location.
4991
  ///
4992
  /// \param StartLoc Starting location of the directive kind.
4993
  /// \param EndLoc Ending location of the directive.
4994
  /// \param CollapsedNum Number of collapsed nested loops.
4995
  ///
4996
  OMPTeamsDistributeSimdDirective(SourceLocation StartLoc,
4997
                                  SourceLocation EndLoc, unsigned CollapsedNum)
4998
6.44k
      : OMPLoopDirective(OMPTeamsDistributeSimdDirectiveClass,
4999
6.44k
                         llvm::omp::OMPD_teams_distribute_simd, StartLoc,
5000
6.44k
                         EndLoc, CollapsedNum) {}
5001
5002
  /// Build an empty directive.
5003
  ///
5004
  /// \param CollapsedNum Number of collapsed nested loops.
5005
  ///
5006
  explicit OMPTeamsDistributeSimdDirective(unsigned CollapsedNum)
5007
246
      : OMPLoopDirective(OMPTeamsDistributeSimdDirectiveClass,
5008
246
                         llvm::omp::OMPD_teams_distribute_simd,
5009
246
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
5010
5011
public:
5012
  /// Creates directive with a list of \a Clauses.
5013
  ///
5014
  /// \param C AST context.
5015
  /// \param StartLoc Starting location of the directive kind.
5016
  /// \param EndLoc Ending Location of the directive.
5017
  /// \param CollapsedNum Number of collapsed loops.
5018
  /// \param Clauses List of clauses.
5019
  /// \param AssociatedStmt Statement, associated with the directive.
5020
  /// \param Exprs Helper expressions for CodeGen.
5021
  ///
5022
  static OMPTeamsDistributeSimdDirective *
5023
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5024
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5025
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
5026
5027
  /// Creates an empty directive with the place
5028
  /// for \a NumClauses clauses.
5029
  ///
5030
  /// \param C AST context.
5031
  /// \param CollapsedNum Number of collapsed nested loops.
5032
  /// \param NumClauses Number of clauses.
5033
  ///
5034
  static OMPTeamsDistributeSimdDirective *CreateEmpty(const ASTContext &C,
5035
                                                      unsigned NumClauses,
5036
                                                      unsigned CollapsedNum,
5037
                                                      EmptyShell);
5038
5039
2.85k
  static bool classof(const Stmt *T) {
5040
2.85k
    return T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass;
5041
2.85k
  }
5042
};
5043
5044
/// This represents '#pragma omp teams distribute parallel for simd' composite
5045
/// directive.
5046
///
5047
/// \code
5048
/// #pragma omp teams distribute parallel for simd private(x)
5049
/// \endcode
5050
/// In this example directive '#pragma omp teams distribute parallel for simd'
5051
/// has clause 'private' with the variables 'x'
5052
///
5053
class OMPTeamsDistributeParallelForSimdDirective final
5054
    : public OMPLoopDirective {
5055
  friend class ASTStmtReader;
5056
  friend class OMPExecutableDirective;
5057
5058
  /// Build directive with the given start and end location.
5059
  ///
5060
  /// \param StartLoc Starting location of the directive kind.
5061
  /// \param EndLoc Ending location of the directive.
5062
  /// \param CollapsedNum Number of collapsed nested loops.
5063
  ///
5064
  OMPTeamsDistributeParallelForSimdDirective(SourceLocation StartLoc,
5065
                                             SourceLocation EndLoc,
5066
                                             unsigned CollapsedNum)
5067
7.31k
      : OMPLoopDirective(OMPTeamsDistributeParallelForSimdDirectiveClass,
5068
7.31k
                         llvm::omp::OMPD_teams_distribute_parallel_for_simd,
5069
7.31k
                         StartLoc, EndLoc, CollapsedNum) {}
5070
5071
  /// Build an empty directive.
5072
  ///
5073
  /// \param CollapsedNum Number of collapsed nested loops.
5074
  ///
5075
  explicit OMPTeamsDistributeParallelForSimdDirective(unsigned CollapsedNum)
5076
410
      : OMPLoopDirective(OMPTeamsDistributeParallelForSimdDirectiveClass,
5077
410
                         llvm::omp::OMPD_teams_distribute_parallel_for_simd,
5078
410
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
5079
5080
public:
5081
  /// Creates directive with a list of \a Clauses.
5082
  ///
5083
  /// \param C AST context.
5084
  /// \param StartLoc Starting location of the directive kind.
5085
  /// \param EndLoc Ending Location of the directive.
5086
  /// \param CollapsedNum Number of collapsed loops.
5087
  /// \param Clauses List of clauses.
5088
  /// \param AssociatedStmt Statement, associated with the directive.
5089
  /// \param Exprs Helper expressions for CodeGen.
5090
  ///
5091
  static OMPTeamsDistributeParallelForSimdDirective *
5092
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5093
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5094
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
5095
5096
  /// Creates an empty directive with the place for \a NumClauses clauses.
5097
  ///
5098
  /// \param C AST context.
5099
  /// \param CollapsedNum Number of collapsed nested loops.
5100
  /// \param NumClauses Number of clauses.
5101
  ///
5102
  static OMPTeamsDistributeParallelForSimdDirective *
5103
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5104
              EmptyShell);
5105
5106
3.37k
  static bool classof(const Stmt *T) {
5107
3.37k
    return T->getStmtClass() == OMPTeamsDistributeParallelForSimdDirectiveClass;
5108
3.37k
  }
5109
};
5110
5111
/// This represents '#pragma omp teams distribute parallel for' composite
5112
/// directive.
5113
///
5114
/// \code
5115
/// #pragma omp teams distribute parallel for private(x)
5116
/// \endcode
5117
/// In this example directive '#pragma omp teams distribute parallel for'
5118
/// has clause 'private' with the variables 'x'
5119
///
5120
class OMPTeamsDistributeParallelForDirective final : public OMPLoopDirective {
5121
  friend class ASTStmtReader;
5122
  friend class OMPExecutableDirective;
5123
  /// true if the construct has inner cancel directive.
5124
  bool HasCancel = false;
5125
5126
  /// Build directive with the given start and end location.
5127
  ///
5128
  /// \param StartLoc Starting location of the directive kind.
5129
  /// \param EndLoc Ending location of the directive.
5130
  /// \param CollapsedNum Number of collapsed nested loops.
5131
  ///
5132
  OMPTeamsDistributeParallelForDirective(SourceLocation StartLoc,
5133
                                         SourceLocation EndLoc,
5134
                                         unsigned CollapsedNum)
5135
6.35k
      : OMPLoopDirective(OMPTeamsDistributeParallelForDirectiveClass,
5136
6.35k
                         llvm::omp::OMPD_teams_distribute_parallel_for,
5137
6.35k
                         StartLoc, EndLoc, CollapsedNum) {}
5138
5139
  /// Build an empty directive.
5140
  ///
5141
  /// \param CollapsedNum Number of collapsed nested loops.
5142
  ///
5143
  explicit OMPTeamsDistributeParallelForDirective(unsigned CollapsedNum)
5144
366
      : OMPLoopDirective(OMPTeamsDistributeParallelForDirectiveClass,
5145
366
                         llvm::omp::OMPD_teams_distribute_parallel_for,
5146
366
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
5147
5148
  /// Sets special task reduction descriptor.
5149
6.35k
  void setTaskReductionRefExpr(Expr *E) {
5150
6.35k
    Data->getChildren()[numLoopChildren(
5151
6.35k
        getLoopsNumber(), llvm::omp::OMPD_teams_distribute_parallel_for)] = E;
5152
6.35k
  }
5153
5154
  /// Set cancel state.
5155
366
  void setHasCancel(bool Has) { HasCancel = Has; }
5156
5157
public:
5158
  /// Creates directive with a list of \a Clauses.
5159
  ///
5160
  /// \param C AST context.
5161
  /// \param StartLoc Starting location of the directive kind.
5162
  /// \param EndLoc Ending Location of the directive.
5163
  /// \param CollapsedNum Number of collapsed loops.
5164
  /// \param Clauses List of clauses.
5165
  /// \param AssociatedStmt Statement, associated with the directive.
5166
  /// \param Exprs Helper expressions for CodeGen.
5167
  /// \param TaskRedRef Task reduction special reference expression to handle
5168
  /// taskgroup descriptor.
5169
  /// \param HasCancel true if this directive has inner cancel directive.
5170
  ///
5171
  static OMPTeamsDistributeParallelForDirective *
5172
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5173
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5174
         Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
5175
         bool HasCancel);
5176
5177
  /// Creates an empty directive with the place for \a NumClauses clauses.
5178
  ///
5179
  /// \param C AST context.
5180
  /// \param CollapsedNum Number of collapsed nested loops.
5181
  /// \param NumClauses Number of clauses.
5182
  ///
5183
  static OMPTeamsDistributeParallelForDirective *
5184
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5185
              EmptyShell);
5186
5187
  /// Returns special task reduction reference expression.
5188
4
  Expr *getTaskReductionRefExpr() {
5189
4
    return cast_or_null<Expr>(Data->getChildren()[numLoopChildren(
5190
4
        getLoopsNumber(), llvm::omp::OMPD_teams_distribute_parallel_for)]);
5191
4
  }
5192
4
  const Expr *getTaskReductionRefExpr() const {
5193
4
    return const_cast<OMPTeamsDistributeParallelForDirective *>(this)
5194
4
        ->getTaskReductionRefExpr();
5195
4
  }
5196
5197
  /// Return true if current directive has inner cancel directive.
5198
1.40k
  bool hasCancel() const { return HasCancel; }
5199
5200
13.7k
  static bool classof(const Stmt *T) {
5201
13.7k
    return T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass;
5202
13.7k
  }
5203
};
5204
5205
/// This represents '#pragma omp target teams' directive.
5206
///
5207
/// \code
5208
/// #pragma omp target teams if(a>0)
5209
/// \endcode
5210
/// In this example directive '#pragma omp target teams' has clause 'if' with
5211
/// condition 'a>0'.
5212
///
5213
class OMPTargetTeamsDirective final : public OMPExecutableDirective {
5214
  friend class ASTStmtReader;
5215
  friend class OMPExecutableDirective;
5216
  /// Build directive with the given start and end location.
5217
  ///
5218
  /// \param StartLoc Starting location of the directive kind.
5219
  /// \param EndLoc Ending location of the directive.
5220
  ///
5221
  OMPTargetTeamsDirective(SourceLocation StartLoc, SourceLocation EndLoc)
5222
9.71k
      : OMPExecutableDirective(OMPTargetTeamsDirectiveClass,
5223
9.71k
                               llvm::omp::OMPD_target_teams, StartLoc, EndLoc) {
5224
9.71k
  }
5225
5226
  /// Build an empty directive.
5227
  ///
5228
  explicit OMPTargetTeamsDirective()
5229
763
      : OMPExecutableDirective(OMPTargetTeamsDirectiveClass,
5230
763
                               llvm::omp::OMPD_target_teams, SourceLocation(),
5231
763
                               SourceLocation()) {}
5232
5233
public:
5234
  /// Creates directive with a list of \a Clauses.
5235
  ///
5236
  /// \param C AST context.
5237
  /// \param StartLoc Starting location of the directive kind.
5238
  /// \param EndLoc Ending Location of the directive.
5239
  /// \param Clauses List of clauses.
5240
  /// \param AssociatedStmt Statement, associated with the directive.
5241
  ///
5242
  static OMPTargetTeamsDirective *Create(const ASTContext &C,
5243
                                         SourceLocation StartLoc,
5244
                                         SourceLocation EndLoc,
5245
                                         ArrayRef<OMPClause *> Clauses,
5246
                                         Stmt *AssociatedStmt);
5247
5248
  /// Creates an empty directive with the place for \a NumClauses clauses.
5249
  ///
5250
  /// \param C AST context.
5251
  /// \param NumClauses Number of clauses.
5252
  ///
5253
  static OMPTargetTeamsDirective *CreateEmpty(const ASTContext &C,
5254
                                              unsigned NumClauses, EmptyShell);
5255
5256
4.58k
  static bool classof(const Stmt *T) {
5257
4.58k
    return T->getStmtClass() == OMPTargetTeamsDirectiveClass;
5258
4.58k
  }
5259
};
5260
5261
/// This represents '#pragma omp target teams distribute' combined directive.
5262
///
5263
/// \code
5264
/// #pragma omp target teams distribute private(x)
5265
/// \endcode
5266
/// In this example directive '#pragma omp target teams distribute' has clause
5267
/// 'private' with the variables 'x'
5268
///
5269
class OMPTargetTeamsDistributeDirective final : public OMPLoopDirective {
5270
  friend class ASTStmtReader;
5271
  friend class OMPExecutableDirective;
5272
5273
  /// Build directive with the given start and end location.
5274
  ///
5275
  /// \param StartLoc Starting location of the directive kind.
5276
  /// \param EndLoc Ending location of the directive.
5277
  /// \param CollapsedNum Number of collapsed nested loops.
5278
  ///
5279
  OMPTargetTeamsDistributeDirective(SourceLocation StartLoc,
5280
                                    SourceLocation EndLoc,
5281
                                    unsigned CollapsedNum)
5282
9.12k
      : OMPLoopDirective(OMPTargetTeamsDistributeDirectiveClass,
5283
9.12k
                         llvm::omp::OMPD_target_teams_distribute, StartLoc,
5284
9.12k
                         EndLoc, CollapsedNum) {}
5285
5286
  /// Build an empty directive.
5287
  ///
5288
  /// \param CollapsedNum Number of collapsed nested loops.
5289
  ///
5290
  explicit OMPTargetTeamsDistributeDirective(unsigned CollapsedNum)
5291
537
      : OMPLoopDirective(OMPTargetTeamsDistributeDirectiveClass,
5292
537
                         llvm::omp::OMPD_target_teams_distribute,
5293
537
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
5294
5295
public:
5296
  /// Creates directive with a list of \a Clauses.
5297
  ///
5298
  /// \param C AST context.
5299
  /// \param StartLoc Starting location of the directive kind.
5300
  /// \param EndLoc Ending Location of the directive.
5301
  /// \param CollapsedNum Number of collapsed loops.
5302
  /// \param Clauses List of clauses.
5303
  /// \param AssociatedStmt Statement, associated with the directive.
5304
  /// \param Exprs Helper expressions for CodeGen.
5305
  ///
5306
  static OMPTargetTeamsDistributeDirective *
5307
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5308
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5309
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
5310
5311
  /// Creates an empty directive with the place for \a NumClauses clauses.
5312
  ///
5313
  /// \param C AST context.
5314
  /// \param CollapsedNum Number of collapsed nested loops.
5315
  /// \param NumClauses Number of clauses.
5316
  ///
5317
  static OMPTargetTeamsDistributeDirective *
5318
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5319
              EmptyShell);
5320
5321
4.36k
  static bool classof(const Stmt *T) {
5322
4.36k
    return T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass;
5323
4.36k
  }
5324
};
5325
5326
/// This represents '#pragma omp target teams distribute parallel for' combined
5327
/// directive.
5328
///
5329
/// \code
5330
/// #pragma omp target teams distribute parallel for private(x)
5331
/// \endcode
5332
/// In this example directive '#pragma omp target teams distribute parallel
5333
/// for' has clause 'private' with the variables 'x'
5334
///
5335
class OMPTargetTeamsDistributeParallelForDirective final
5336
    : public OMPLoopDirective {
5337
  friend class ASTStmtReader;
5338
  friend class OMPExecutableDirective;
5339
  /// true if the construct has inner cancel directive.
5340
  bool HasCancel = false;
5341
5342
  /// Build directive with the given start and end location.
5343
  ///
5344
  /// \param StartLoc Starting location of the directive kind.
5345
  /// \param EndLoc Ending location of the directive.
5346
  /// \param CollapsedNum Number of collapsed nested loops.
5347
  ///
5348
  OMPTargetTeamsDistributeParallelForDirective(SourceLocation StartLoc,
5349
                                               SourceLocation EndLoc,
5350
                                               unsigned CollapsedNum)
5351
9.19k
      : OMPLoopDirective(OMPTargetTeamsDistributeParallelForDirectiveClass,
5352
9.19k
                         llvm::omp::OMPD_target_teams_distribute_parallel_for,
5353
9.19k
                         StartLoc, EndLoc, CollapsedNum) {}
5354
5355
  /// Build an empty directive.
5356
  ///
5357
  /// \param CollapsedNum Number of collapsed nested loops.
5358
  ///
5359
  explicit OMPTargetTeamsDistributeParallelForDirective(unsigned CollapsedNum)
5360
434
      : OMPLoopDirective(OMPTargetTeamsDistributeParallelForDirectiveClass,
5361
434
                         llvm::omp::OMPD_target_teams_distribute_parallel_for,
5362
434
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
5363
5364
  /// Sets special task reduction descriptor.
5365
9.19k
  void setTaskReductionRefExpr(Expr *E) {
5366
9.19k
    Data->getChildren()[numLoopChildren(
5367
9.19k
        getLoopsNumber(),
5368
9.19k
        llvm::omp::OMPD_target_teams_distribute_parallel_for)] = E;
5369
9.19k
  }
5370
5371
  /// Set cancel state.
5372
434
  void setHasCancel(bool Has) { HasCancel = Has; }
5373
5374
public:
5375
  /// Creates directive with a list of \a Clauses.
5376
  ///
5377
  /// \param C AST context.
5378
  /// \param StartLoc Starting location of the directive kind.
5379
  /// \param EndLoc Ending Location of the directive.
5380
  /// \param CollapsedNum Number of collapsed loops.
5381
  /// \param Clauses List of clauses.
5382
  /// \param AssociatedStmt Statement, associated with the directive.
5383
  /// \param Exprs Helper expressions for CodeGen.
5384
  /// \param TaskRedRef Task reduction special reference expression to handle
5385
  /// taskgroup descriptor.
5386
  /// \param HasCancel true if this directive has inner cancel directive.
5387
  ///
5388
  static OMPTargetTeamsDistributeParallelForDirective *
5389
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5390
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5391
         Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
5392
         bool HasCancel);
5393
5394
  /// Creates an empty directive with the place for \a NumClauses clauses.
5395
  ///
5396
  /// \param C AST context.
5397
  /// \param CollapsedNum Number of collapsed nested loops.
5398
  /// \param NumClauses Number of clauses.
5399
  ///
5400
  static OMPTargetTeamsDistributeParallelForDirective *
5401
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5402
              EmptyShell);
5403
5404
  /// Returns special task reduction reference expression.
5405
4
  Expr *getTaskReductionRefExpr() {
5406
4
    return cast_or_null<Expr>(Data->getChildren()[numLoopChildren(
5407
4
        getLoopsNumber(),
5408
4
        llvm::omp::OMPD_target_teams_distribute_parallel_for)]);
5409
4
  }
5410
4
  const Expr *getTaskReductionRefExpr() const {
5411
4
    return const_cast<OMPTargetTeamsDistributeParallelForDirective *>(this)
5412
4
        ->getTaskReductionRefExpr();
5413
4
  }
5414
5415
  /// Return true if current directive has inner cancel directive.
5416
1.95k
  bool hasCancel() const { return HasCancel; }
5417
5418
13.5k
  static bool classof(const Stmt *T) {
5419
13.5k
    return T->getStmtClass() ==
5420
13.5k
           OMPTargetTeamsDistributeParallelForDirectiveClass;
5421
13.5k
  }
5422
};
5423
5424
/// This represents '#pragma omp target teams distribute parallel for simd'
5425
/// combined directive.
5426
///
5427
/// \code
5428
/// #pragma omp target teams distribute parallel for simd private(x)
5429
/// \endcode
5430
/// In this example directive '#pragma omp target teams distribute parallel
5431
/// for simd' has clause 'private' with the variables 'x'
5432
///
5433
class OMPTargetTeamsDistributeParallelForSimdDirective final
5434
    : public OMPLoopDirective {
5435
  friend class ASTStmtReader;
5436
  friend class OMPExecutableDirective;
5437
5438
  /// Build directive with the given start and end location.
5439
  ///
5440
  /// \param StartLoc Starting location of the directive kind.
5441
  /// \param EndLoc Ending location of the directive.
5442
  /// \param CollapsedNum Number of collapsed nested loops.
5443
  ///
5444
  OMPTargetTeamsDistributeParallelForSimdDirective(SourceLocation StartLoc,
5445
                                                   SourceLocation EndLoc,
5446
                                                   unsigned CollapsedNum)
5447
11.3k
      : OMPLoopDirective(
5448
11.3k
            OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
5449
11.3k
            llvm::omp::OMPD_target_teams_distribute_parallel_for_simd, StartLoc,
5450
11.3k
            EndLoc, CollapsedNum) {}
5451
5452
  /// Build an empty directive.
5453
  ///
5454
  /// \param CollapsedNum Number of collapsed nested loops.
5455
  ///
5456
  explicit OMPTargetTeamsDistributeParallelForSimdDirective(
5457
      unsigned CollapsedNum)
5458
633
      : OMPLoopDirective(
5459
633
            OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
5460
633
            llvm::omp::OMPD_target_teams_distribute_parallel_for_simd,
5461
633
            SourceLocation(), SourceLocation(), CollapsedNum) {}
5462
5463
public:
5464
  /// Creates directive with a list of \a Clauses.
5465
  ///
5466
  /// \param C AST context.
5467
  /// \param StartLoc Starting location of the directive kind.
5468
  /// \param EndLoc Ending Location of the directive.
5469
  /// \param CollapsedNum Number of collapsed loops.
5470
  /// \param Clauses List of clauses.
5471
  /// \param AssociatedStmt Statement, associated with the directive.
5472
  /// \param Exprs Helper expressions for CodeGen.
5473
  ///
5474
  static OMPTargetTeamsDistributeParallelForSimdDirective *
5475
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5476
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5477
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
5478
5479
  /// Creates an empty directive with the place for \a NumClauses clauses.
5480
  ///
5481
  /// \param C AST context.
5482
  /// \param CollapsedNum Number of collapsed nested loops.
5483
  /// \param NumClauses Number of clauses.
5484
  ///
5485
  static OMPTargetTeamsDistributeParallelForSimdDirective *
5486
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5487
              EmptyShell);
5488
5489
5.32k
  static bool classof(const Stmt *T) {
5490
5.32k
    return T->getStmtClass() ==
5491
5.32k
           OMPTargetTeamsDistributeParallelForSimdDirectiveClass;
5492
5.32k
  }
5493
};
5494
5495
/// This represents '#pragma omp target teams distribute simd' combined
5496
/// directive.
5497
///
5498
/// \code
5499
/// #pragma omp target teams distribute simd private(x)
5500
/// \endcode
5501
/// In this example directive '#pragma omp target teams distribute simd'
5502
/// has clause 'private' with the variables 'x'
5503
///
5504
class OMPTargetTeamsDistributeSimdDirective final : public OMPLoopDirective {
5505
  friend class ASTStmtReader;
5506
  friend class OMPExecutableDirective;
5507
5508
  /// Build directive with the given start and end location.
5509
  ///
5510
  /// \param StartLoc Starting location of the directive kind.
5511
  /// \param EndLoc Ending location of the directive.
5512
  /// \param CollapsedNum Number of collapsed nested loops.
5513
  ///
5514
  OMPTargetTeamsDistributeSimdDirective(SourceLocation StartLoc,
5515
                                        SourceLocation EndLoc,
5516
                                        unsigned CollapsedNum)
5517
10.7k
      : OMPLoopDirective(OMPTargetTeamsDistributeSimdDirectiveClass,
5518
10.7k
                         llvm::omp::OMPD_target_teams_distribute_simd, StartLoc,
5519
10.7k
                         EndLoc, CollapsedNum) {}
5520
5521
  /// Build an empty directive.
5522
  ///
5523
  /// \param CollapsedNum Number of collapsed nested loops.
5524
  ///
5525
  explicit OMPTargetTeamsDistributeSimdDirective(unsigned CollapsedNum)
5526
587
      : OMPLoopDirective(OMPTargetTeamsDistributeSimdDirectiveClass,
5527
587
                         llvm::omp::OMPD_target_teams_distribute_simd,
5528
587
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
5529
5530
public:
5531
  /// Creates directive with a list of \a Clauses.
5532
  ///
5533
  /// \param C AST context.
5534
  /// \param StartLoc Starting location of the directive kind.
5535
  /// \param EndLoc Ending Location of the directive.
5536
  /// \param CollapsedNum Number of collapsed loops.
5537
  /// \param Clauses List of clauses.
5538
  /// \param AssociatedStmt Statement, associated with the directive.
5539
  /// \param Exprs Helper expressions for CodeGen.
5540
  ///
5541
  static OMPTargetTeamsDistributeSimdDirective *
5542
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5543
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5544
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
5545
5546
  /// Creates an empty directive with the place for \a NumClauses clauses.
5547
  ///
5548
  /// \param C AST context.
5549
  /// \param CollapsedNum Number of collapsed nested loops.
5550
  /// \param NumClauses Number of clauses.
5551
  ///
5552
  static OMPTargetTeamsDistributeSimdDirective *
5553
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5554
              EmptyShell);
5555
5556
4.85k
  static bool classof(const Stmt *T) {
5557
4.85k
    return T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass;
5558
4.85k
  }
5559
};
5560
5561
/// This represents the '#pragma omp tile' loop transformation directive.
5562
class OMPTileDirective final : public OMPLoopTransformationDirective {
5563
  friend class ASTStmtReader;
5564
  friend class OMPExecutableDirective;
5565
5566
  /// Default list of offsets.
5567
  enum {
5568
    PreInitsOffset = 0,
5569
    TransformedStmtOffset,
5570
  };
5571
5572
  explicit OMPTileDirective(SourceLocation StartLoc, SourceLocation EndLoc,
5573
                            unsigned NumLoops)
5574
98
      : OMPLoopTransformationDirective(OMPTileDirectiveClass,
5575
98
                                       llvm::omp::OMPD_tile, StartLoc, EndLoc,
5576
98
                                       NumLoops) {
5577
98
    setNumGeneratedLoops(3 * NumLoops);
5578
98
  }
5579
5580
72
  void setPreInits(Stmt *PreInits) {
5581
72
    Data->getChildren()[PreInitsOffset] = PreInits;
5582
72
  }
5583
5584
72
  void setTransformedStmt(Stmt *S) {
5585
72
    Data->getChildren()[TransformedStmtOffset] = S;
5586
72
  }
5587
5588
public:
5589
  /// Create a new AST node representation for '#pragma omp tile'.
5590
  ///
5591
  /// \param C         Context of the AST.
5592
  /// \param StartLoc  Location of the introducer (e.g. the 'omp' token).
5593
  /// \param EndLoc    Location of the directive's end (e.g. the tok::eod).
5594
  /// \param Clauses   The directive's clauses.
5595
  /// \param NumLoops  Number of associated loops (number of items in the
5596
  ///                  'sizes' clause).
5597
  /// \param AssociatedStmt The outermost associated loop.
5598
  /// \param TransformedStmt The loop nest after tiling, or nullptr in
5599
  ///                        dependent contexts.
5600
  /// \param PreInits Helper preinits statements for the loop nest.
5601
  static OMPTileDirective *Create(const ASTContext &C, SourceLocation StartLoc,
5602
                                  SourceLocation EndLoc,
5603
                                  ArrayRef<OMPClause *> Clauses,
5604
                                  unsigned NumLoops, Stmt *AssociatedStmt,
5605
                                  Stmt *TransformedStmt, Stmt *PreInits);
5606
5607
  /// Build an empty '#pragma omp tile' AST node for deserialization.
5608
  ///
5609
  /// \param C          Context of the AST.
5610
  /// \param NumClauses Number of clauses to allocate.
5611
  /// \param NumLoops   Number of associated loops to allocate.
5612
  static OMPTileDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
5613
                                       unsigned NumLoops);
5614
5615
  /// Gets/sets the associated loops after tiling.
5616
  ///
5617
  /// This is in de-sugared format stored as a CompoundStmt.
5618
  ///
5619
  /// \code
5620
  ///   for (...)
5621
  ///     ...
5622
  /// \endcode
5623
  ///
5624
  /// Note that if the generated loops a become associated loops of another
5625
  /// directive, they may need to be hoisted before them.
5626
65
  Stmt *getTransformedStmt() const {
5627
65
    return Data->getChildren()[TransformedStmtOffset];
5628
65
  }
5629
5630
  /// Return preinits statement.
5631
37
  Stmt *getPreInits() const { return Data->getChildren()[PreInitsOffset]; }
5632
5633
39
  static bool classof(const Stmt *T) {
5634
39
    return T->getStmtClass() == OMPTileDirectiveClass;
5635
39
  }
5636
};
5637
5638
/// This represents the '#pragma omp unroll' loop transformation directive.
5639
///
5640
/// \code
5641
/// #pragma omp unroll
5642
/// for (int i = 0; i < 64; ++i)
5643
/// \endcode
5644
class OMPUnrollDirective final : public OMPLoopTransformationDirective {
5645
  friend class ASTStmtReader;
5646
  friend class OMPExecutableDirective;
5647
5648
  /// Default list of offsets.
5649
  enum {
5650
    PreInitsOffset = 0,
5651
    TransformedStmtOffset,
5652
  };
5653
5654
  explicit OMPUnrollDirective(SourceLocation StartLoc, SourceLocation EndLoc)
5655
123
      : OMPLoopTransformationDirective(OMPUnrollDirectiveClass,
5656
123
                                       llvm::omp::OMPD_unroll, StartLoc, EndLoc,
5657
123
                                       1) {}
5658
5659
  /// Set the pre-init statements.
5660
97
  void setPreInits(Stmt *PreInits) {
5661
97
    Data->getChildren()[PreInitsOffset] = PreInits;
5662
97
  }
5663
5664
  /// Set the de-sugared statement.
5665
97
  void setTransformedStmt(Stmt *S) {
5666
97
    Data->getChildren()[TransformedStmtOffset] = S;
5667
97
  }
5668
5669
public:
5670
  /// Create a new AST node representation for '#pragma omp unroll'.
5671
  ///
5672
  /// \param C         Context of the AST.
5673
  /// \param StartLoc  Location of the introducer (e.g. the 'omp' token).
5674
  /// \param EndLoc    Location of the directive's end (e.g. the tok::eod).
5675
  /// \param Clauses   The directive's clauses.
5676
  /// \param AssociatedStmt The outermost associated loop.
5677
  /// \param TransformedStmt The loop nest after tiling, or nullptr in
5678
  ///                        dependent contexts.
5679
  /// \param PreInits   Helper preinits statements for the loop nest.
5680
  static OMPUnrollDirective *
5681
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5682
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
5683
         unsigned NumGeneratedLoops, Stmt *TransformedStmt, Stmt *PreInits);
5684
5685
  /// Build an empty '#pragma omp unroll' AST node for deserialization.
5686
  ///
5687
  /// \param C          Context of the AST.
5688
  /// \param NumClauses Number of clauses to allocate.
5689
  static OMPUnrollDirective *CreateEmpty(const ASTContext &C,
5690
                                         unsigned NumClauses);
5691
5692
  /// Get the de-sugared associated loops after unrolling.
5693
  ///
5694
  /// This is only used if the unrolled loop becomes an associated loop of
5695
  /// another directive, otherwise the loop is emitted directly using loop
5696
  /// transformation metadata. When the unrolled loop cannot be used by another
5697
  /// directive (e.g. because of the full clause), the transformed stmt can also
5698
  /// be nullptr.
5699
58
  Stmt *getTransformedStmt() const {
5700
58
    return Data->getChildren()[TransformedStmtOffset];
5701
58
  }
5702
5703
  /// Return the pre-init statements.
5704
34
  Stmt *getPreInits() const { return Data->getChildren()[PreInitsOffset]; }
5705
5706
39
  static bool classof(const Stmt *T) {
5707
39
    return T->getStmtClass() == OMPUnrollDirectiveClass;
5708
39
  }
5709
};
5710
5711
/// This represents '#pragma omp scan' directive.
5712
///
5713
/// \code
5714
/// #pragma omp scan inclusive(a)
5715
/// \endcode
5716
/// In this example directive '#pragma omp scan' has clause 'inclusive' with
5717
/// list item 'a'.
5718
class OMPScanDirective final : public OMPExecutableDirective {
5719
  friend class ASTStmtReader;
5720
  friend class OMPExecutableDirective;
5721
  /// Build directive with the given start and end location.
5722
  ///
5723
  /// \param StartLoc Starting location of the directive kind.
5724
  /// \param EndLoc Ending location of the directive.
5725
  ///
5726
  OMPScanDirective(SourceLocation StartLoc, SourceLocation EndLoc)
5727
173
      : OMPExecutableDirective(OMPScanDirectiveClass, llvm::omp::OMPD_scan,
5728
173
                               StartLoc, EndLoc) {}
5729
5730
  /// Build an empty directive.
5731
  ///
5732
  explicit OMPScanDirective()
5733
24
      : OMPExecutableDirective(OMPScanDirectiveClass, llvm::omp::OMPD_scan,
5734
24
                               SourceLocation(), SourceLocation()) {}
5735
5736
public:
5737
  /// Creates directive with a list of \a Clauses.
5738
  ///
5739
  /// \param C AST context.
5740
  /// \param StartLoc Starting location of the directive kind.
5741
  /// \param EndLoc Ending Location of the directive.
5742
  /// \param Clauses List of clauses (only single OMPFlushClause clause is
5743
  /// allowed).
5744
  ///
5745
  static OMPScanDirective *Create(const ASTContext &C, SourceLocation StartLoc,
5746
                                  SourceLocation EndLoc,
5747
                                  ArrayRef<OMPClause *> Clauses);
5748
5749
  /// Creates an empty directive with the place for \a NumClauses
5750
  /// clauses.
5751
  ///
5752
  /// \param C AST context.
5753
  /// \param NumClauses Number of clauses.
5754
  ///
5755
  static OMPScanDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
5756
                                       EmptyShell);
5757
5758
20.5k
  static bool classof(const Stmt *T) {
5759
20.5k
    return T->getStmtClass() == OMPScanDirectiveClass;
5760
20.5k
  }
5761
};
5762
5763
/// This represents '#pragma omp interop' directive.
5764
///
5765
/// \code
5766
/// #pragma omp interop init(target:obj) device(x) depend(inout:y) nowait
5767
/// \endcode
5768
/// In this example directive '#pragma omp interop' has
5769
/// clauses 'init', 'device', 'depend' and 'nowait'.
5770
///
5771
class OMPInteropDirective final : public OMPExecutableDirective {
5772
  friend class ASTStmtReader;
5773
  friend class OMPExecutableDirective;
5774
5775
  /// Build directive with the given start and end location.
5776
  ///
5777
  /// \param StartLoc Starting location of the directive.
5778
  /// \param EndLoc Ending location of the directive.
5779
  ///
5780
  OMPInteropDirective(SourceLocation StartLoc, SourceLocation EndLoc)
5781
204
      : OMPExecutableDirective(OMPInteropDirectiveClass,
5782
204
                               llvm::omp::OMPD_interop, StartLoc, EndLoc) {}
5783
5784
  /// Build an empty directive.
5785
  ///
5786
  explicit OMPInteropDirective()
5787
68
      : OMPExecutableDirective(OMPInteropDirectiveClass,
5788
68
                               llvm::omp::OMPD_interop, SourceLocation(),
5789
68
                               SourceLocation()) {}
5790
5791
public:
5792
  /// Creates directive.
5793
  ///
5794
  /// \param C AST context.
5795
  /// \param StartLoc Starting location of the directive.
5796
  /// \param EndLoc Ending Location of the directive.
5797
  /// \param Clauses The directive's clauses.
5798
  ///
5799
  static OMPInteropDirective *Create(const ASTContext &C,
5800
                                     SourceLocation StartLoc,
5801
                                     SourceLocation EndLoc,
5802
                                     ArrayRef<OMPClause *> Clauses);
5803
5804
  /// Creates an empty directive.
5805
  ///
5806
  /// \param C AST context.
5807
  ///
5808
  static OMPInteropDirective *CreateEmpty(const ASTContext &C,
5809
                                          unsigned NumClauses, EmptyShell);
5810
5811
34
  static bool classof(const Stmt *T) {
5812
34
    return T->getStmtClass() == OMPInteropDirectiveClass;
5813
34
  }
5814
};
5815
5816
/// This represents '#pragma omp dispatch' directive.
5817
///
5818
/// \code
5819
/// #pragma omp dispatch device(dnum)
5820
/// \endcode
5821
/// This example shows a directive '#pragma omp dispatch' with a
5822
/// device clause with variable 'dnum'.
5823
///
5824
class OMPDispatchDirective final : public OMPExecutableDirective {
5825
  friend class ASTStmtReader;
5826
  friend class OMPExecutableDirective;
5827
5828
  /// The location of the target-call.
5829
  SourceLocation TargetCallLoc;
5830
5831
  /// Set the location of the target-call.
5832
170
  void setTargetCallLoc(SourceLocation Loc) { TargetCallLoc = Loc; }
5833
5834
  /// Build directive with the given start and end location.
5835
  ///
5836
  /// \param StartLoc Starting location of the directive kind.
5837
  /// \param EndLoc Ending location of the directive.
5838
  ///
5839
  OMPDispatchDirective(SourceLocation StartLoc, SourceLocation EndLoc)
5840
130
      : OMPExecutableDirective(OMPDispatchDirectiveClass,
5841
130
                               llvm::omp::OMPD_dispatch, StartLoc, EndLoc) {}
5842
5843
  /// Build an empty directive.
5844
  ///
5845
  explicit OMPDispatchDirective()
5846
40
      : OMPExecutableDirective(OMPDispatchDirectiveClass,
5847
40
                               llvm::omp::OMPD_dispatch, SourceLocation(),
5848
40
                               SourceLocation()) {}
5849
5850
public:
5851
  /// Creates directive with a list of \a Clauses.
5852
  ///
5853
  /// \param C AST context.
5854
  /// \param StartLoc Starting location of the directive kind.
5855
  /// \param EndLoc Ending Location of the directive.
5856
  /// \param Clauses List of clauses.
5857
  /// \param AssociatedStmt Statement, associated with the directive.
5858
  /// \param TargetCallLoc Location of the target-call.
5859
  ///
5860
  static OMPDispatchDirective *
5861
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5862
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
5863
         SourceLocation TargetCallLoc);
5864
5865
  /// Creates an empty directive with the place for \a NumClauses
5866
  /// clauses.
5867
  ///
5868
  /// \param C AST context.
5869
  /// \param NumClauses Number of clauses.
5870
  ///
5871
  static OMPDispatchDirective *CreateEmpty(const ASTContext &C,
5872
                                           unsigned NumClauses, EmptyShell);
5873
5874
  /// Return location of target-call.
5875
20
  SourceLocation getTargetCallLoc() const { return TargetCallLoc; }
5876
5877
6
  static bool classof(const Stmt *T) {
5878
6
    return T->getStmtClass() == OMPDispatchDirectiveClass;
5879
6
  }
5880
};
5881
5882
/// This represents '#pragma omp masked' directive.
5883
/// \code
5884
/// #pragma omp masked filter(tid)
5885
/// \endcode
5886
/// This example shows a directive '#pragma omp masked' with a filter clause
5887
/// with variable 'tid'.
5888
///
5889
class OMPMaskedDirective final : public OMPExecutableDirective {
5890
  friend class ASTStmtReader;
5891
  friend class OMPExecutableDirective;
5892
5893
  /// Build directive with the given start and end location.
5894
  ///
5895
  /// \param StartLoc Starting location of the directive kind.
5896
  /// \param EndLoc Ending location of the directive.
5897
  ///
5898
  OMPMaskedDirective(SourceLocation StartLoc, SourceLocation EndLoc)
5899
120
      : OMPExecutableDirective(OMPMaskedDirectiveClass, llvm::omp::OMPD_masked,
5900
120
                               StartLoc, EndLoc) {}
5901
5902
  /// Build an empty directive.
5903
  ///
5904
  explicit OMPMaskedDirective()
5905
30
      : OMPExecutableDirective(OMPMaskedDirectiveClass, llvm::omp::OMPD_masked,
5906
30
                               SourceLocation(), SourceLocation()) {}
5907
5908
public:
5909
  /// Creates directive.
5910
  ///
5911
  /// \param C AST context.
5912
  /// \param StartLoc Starting location of the directive kind.
5913
  /// \param EndLoc Ending Location of the directive.
5914
  /// \param AssociatedStmt Statement, associated with the directive.
5915
  ///
5916
  static OMPMaskedDirective *
5917
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5918
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
5919
5920
  /// Creates an empty directive.
5921
  ///
5922
  /// \param C AST context.
5923
  ///
5924
  static OMPMaskedDirective *CreateEmpty(const ASTContext &C,
5925
                                         unsigned NumClauses, EmptyShell);
5926
5927
40
  static bool classof(const Stmt *T) {
5928
40
    return T->getStmtClass() == OMPMaskedDirectiveClass;
5929
40
  }
5930
};
5931
5932
/// This represents '#pragma omp metadirective' directive.
5933
///
5934
/// \code
5935
/// #pragma omp metadirective when(user={condition(N>10)}: parallel for)
5936
/// \endcode
5937
/// In this example directive '#pragma omp metadirective' has clauses 'when'
5938
/// with a dynamic user condition to check if a variable 'N > 10'
5939
///
5940
class OMPMetaDirective final : public OMPExecutableDirective {
5941
  friend class ASTStmtReader;
5942
  friend class OMPExecutableDirective;
5943
  Stmt *IfStmt;
5944
5945
  OMPMetaDirective(SourceLocation StartLoc, SourceLocation EndLoc)
5946
0
      : OMPExecutableDirective(OMPMetaDirectiveClass,
5947
0
                               llvm::omp::OMPD_metadirective, StartLoc,
5948
0
                               EndLoc) {}
5949
  explicit OMPMetaDirective()
5950
0
      : OMPExecutableDirective(OMPMetaDirectiveClass,
5951
0
                               llvm::omp::OMPD_metadirective, SourceLocation(),
5952
0
                               SourceLocation()) {}
5953
5954
0
  void setIfStmt(Stmt *S) { IfStmt = S; }
5955
5956
public:
5957
  static OMPMetaDirective *Create(const ASTContext &C, SourceLocation StartLoc,
5958
                                  SourceLocation EndLoc,
5959
                                  ArrayRef<OMPClause *> Clauses,
5960
                                  Stmt *AssociatedStmt, Stmt *IfStmt);
5961
  static OMPMetaDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
5962
                                       EmptyShell);
5963
0
  Stmt *getIfStmt() const { return IfStmt; }
5964
5965
0
  static bool classof(const Stmt *T) {
5966
0
    return T->getStmtClass() == OMPMetaDirectiveClass;
5967
0
  }
5968
};
5969
5970
/// This represents '#pragma omp loop' directive.
5971
///
5972
/// \code
5973
/// #pragma omp loop private(a,b) binding(parallel) order(concurrent)
5974
/// \endcode
5975
/// In this example directive '#pragma omp loop' has
5976
/// clauses 'private' with the variables 'a' and 'b', 'binding' with
5977
/// modifier 'parallel' and 'order(concurrent).
5978
///
5979
class OMPGenericLoopDirective final : public OMPLoopDirective {
5980
  friend class ASTStmtReader;
5981
  friend class OMPExecutableDirective;
5982
  /// Build directive with the given start and end location.
5983
  ///
5984
  /// \param StartLoc Starting location of the directive kind.
5985
  /// \param EndLoc Ending location of the directive.
5986
  /// \param CollapsedNum Number of collapsed nested loops.
5987
  ///
5988
  OMPGenericLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc,
5989
                          unsigned CollapsedNum)
5990
0
      : OMPLoopDirective(OMPGenericLoopDirectiveClass, llvm::omp::OMPD_loop,
5991
0
                         StartLoc, EndLoc, CollapsedNum) {}
5992
5993
  /// Build an empty directive.
5994
  ///
5995
  /// \param CollapsedNum Number of collapsed nested loops.
5996
  ///
5997
  explicit OMPGenericLoopDirective(unsigned CollapsedNum)
5998
0
      : OMPLoopDirective(OMPGenericLoopDirectiveClass, llvm::omp::OMPD_loop,
5999
0
                         SourceLocation(), SourceLocation(), CollapsedNum) {}
6000
6001
public:
6002
  /// Creates directive with a list of \p Clauses.
6003
  ///
6004
  /// \param C AST context.
6005
  /// \param StartLoc Starting location of the directive kind.
6006
  /// \param EndLoc Ending Location of the directive.
6007
  /// \param CollapsedNum Number of collapsed loops.
6008
  /// \param Clauses List of clauses.
6009
  /// \param AssociatedStmt Statement, associated with the directive.
6010
  /// \param Exprs Helper expressions for CodeGen.
6011
  ///
6012
  static OMPGenericLoopDirective *
6013
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6014
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6015
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
6016
6017
  /// Creates an empty directive with a place for \a NumClauses clauses.
6018
  ///
6019
  /// \param C AST context.
6020
  /// \param NumClauses Number of clauses.
6021
  /// \param CollapsedNum Number of collapsed nested loops.
6022
  ///
6023
  static OMPGenericLoopDirective *CreateEmpty(const ASTContext &C,
6024
                                              unsigned NumClauses,
6025
                                              unsigned CollapsedNum,
6026
                                              EmptyShell);
6027
6028
0
  static bool classof(const Stmt *T) {
6029
0
    return T->getStmtClass() == OMPGenericLoopDirectiveClass;
6030
0
  }
6031
};
6032
6033
/// This represents '#pragma omp teams loop' directive.
6034
///
6035
/// \code
6036
/// #pragma omp teams loop private(a,b) order(concurrent)
6037
/// \endcode
6038
/// In this example directive '#pragma omp teams loop' has
6039
/// clauses 'private' with the variables 'a' and 'b', and order(concurrent).
6040
///
6041
class OMPTeamsGenericLoopDirective final : public OMPLoopDirective {
6042
  friend class ASTStmtReader;
6043
  friend class OMPExecutableDirective;
6044
  /// Build directive with the given start and end location.
6045
  ///
6046
  /// \param StartLoc Starting location of the directive kind.
6047
  /// \param EndLoc Ending location of the directive.
6048
  /// \param CollapsedNum Number of collapsed nested loops.
6049
  ///
6050
  OMPTeamsGenericLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc,
6051
                               unsigned CollapsedNum)
6052
205
      : OMPLoopDirective(OMPTeamsGenericLoopDirectiveClass,
6053
205
                         llvm::omp::OMPD_teams_loop, StartLoc, EndLoc,
6054
205
                         CollapsedNum) {}
6055
6056
  /// Build an empty directive.
6057
  ///
6058
  /// \param CollapsedNum Number of collapsed nested loops.
6059
  ///
6060
  explicit OMPTeamsGenericLoopDirective(unsigned CollapsedNum)
6061
63
      : OMPLoopDirective(OMPTeamsGenericLoopDirectiveClass,
6062
63
                         llvm::omp::OMPD_teams_loop, SourceLocation(),
6063
63
                         SourceLocation(), CollapsedNum) {}
6064
6065
public:
6066
  /// Creates directive with a list of \p Clauses.
6067
  ///
6068
  /// \param C AST context.
6069
  /// \param StartLoc Starting location of the directive kind.
6070
  /// \param EndLoc Ending Location of the directive.
6071
  /// \param CollapsedNum Number of collapsed loops.
6072
  /// \param Clauses List of clauses.
6073
  /// \param AssociatedStmt Statement, associated with the directive.
6074
  /// \param Exprs Helper expressions for CodeGen.
6075
  ///
6076
  static OMPTeamsGenericLoopDirective *
6077
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6078
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6079
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
6080
6081
  /// Creates an empty directive with the place
6082
  /// for \a NumClauses clauses.
6083
  ///
6084
  /// \param C AST context.
6085
  /// \param CollapsedNum Number of collapsed nested loops.
6086
  /// \param NumClauses Number of clauses.
6087
  ///
6088
  static OMPTeamsGenericLoopDirective *CreateEmpty(const ASTContext &C,
6089
                                                   unsigned NumClauses,
6090
                                                   unsigned CollapsedNum,
6091
                                                   EmptyShell);
6092
6093
111
  static bool classof(const Stmt *T) {
6094
111
    return T->getStmtClass() == OMPTeamsGenericLoopDirectiveClass;
6095
111
  }
6096
};
6097
6098
/// This represents '#pragma omp target teams loop' directive.
6099
///
6100
/// \code
6101
/// #pragma omp target teams loop private(a,b) order(concurrent)
6102
/// \endcode
6103
/// In this example directive '#pragma omp target teams loop' has
6104
/// clauses 'private' with the variables 'a' and 'b', and order(concurrent).
6105
///
6106
class OMPTargetTeamsGenericLoopDirective final : public OMPLoopDirective {
6107
  friend class ASTStmtReader;
6108
  friend class OMPExecutableDirective;
6109
  /// Build directive with the given start and end location.
6110
  ///
6111
  /// \param StartLoc Starting location of the directive kind.
6112
  /// \param EndLoc Ending location of the directive.
6113
  /// \param CollapsedNum Number of collapsed nested loops.
6114
  ///
6115
  OMPTargetTeamsGenericLoopDirective(SourceLocation StartLoc,
6116
                                     SourceLocation EndLoc,
6117
                                     unsigned CollapsedNum)
6118
517
      : OMPLoopDirective(OMPTargetTeamsGenericLoopDirectiveClass,
6119
517
                         llvm::omp::OMPD_target_teams_loop, StartLoc, EndLoc,
6120
517
                         CollapsedNum) {}
6121
6122
  /// Build an empty directive.
6123
  ///
6124
  /// \param CollapsedNum Number of collapsed nested loops.
6125
  ///
6126
  explicit OMPTargetTeamsGenericLoopDirective(unsigned CollapsedNum)
6127
144
      : OMPLoopDirective(OMPTargetTeamsGenericLoopDirectiveClass,
6128
144
                         llvm::omp::OMPD_target_teams_loop, SourceLocation(),
6129
144
                         SourceLocation(), CollapsedNum) {}
6130
6131
public:
6132
  /// Creates directive with a list of \p Clauses.
6133
  ///
6134
  /// \param C AST context.
6135
  /// \param StartLoc Starting location of the directive kind.
6136
  /// \param EndLoc Ending Location of the directive.
6137
  /// \param CollapsedNum Number of collapsed loops.
6138
  /// \param Clauses List of clauses.
6139
  /// \param AssociatedStmt Statement, associated with the directive.
6140
  /// \param Exprs Helper expressions for CodeGen.
6141
  ///
6142
  static OMPTargetTeamsGenericLoopDirective *
6143
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6144
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6145
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
6146
6147
  /// Creates an empty directive with the place
6148
  /// for \a NumClauses clauses.
6149
  ///
6150
  /// \param C AST context.
6151
  /// \param CollapsedNum Number of collapsed nested loops.
6152
  /// \param NumClauses Number of clauses.
6153
  ///
6154
  static OMPTargetTeamsGenericLoopDirective *CreateEmpty(const ASTContext &C,
6155
                                                         unsigned NumClauses,
6156
                                                         unsigned CollapsedNum,
6157
                                                         EmptyShell);
6158
6159
313
  static bool classof(const Stmt *T) {
6160
313
    return T->getStmtClass() == OMPTargetTeamsGenericLoopDirectiveClass;
6161
313
  }
6162
};
6163
6164
/// This represents '#pragma omp parallel loop' directive.
6165
///
6166
/// \code
6167
/// #pragma omp parallel loop private(a,b) order(concurrent)
6168
/// \endcode
6169
/// In this example directive '#pragma omp parallel loop' has
6170
/// clauses 'private' with the variables 'a' and 'b', and order(concurrent).
6171
///
6172
class OMPParallelGenericLoopDirective final : public OMPLoopDirective {
6173
  friend class ASTStmtReader;
6174
  friend class OMPExecutableDirective;
6175
  /// Build directive with the given start and end location.
6176
  ///
6177
  /// \param StartLoc Starting location of the directive kind.
6178
  /// \param EndLoc Ending location of the directive.
6179
  /// \param CollapsedNum Number of collapsed nested loops.
6180
  ///
6181
  OMPParallelGenericLoopDirective(SourceLocation StartLoc,
6182
                                  SourceLocation EndLoc, unsigned CollapsedNum)
6183
43
      : OMPLoopDirective(OMPParallelGenericLoopDirectiveClass,
6184
43
                         llvm::omp::OMPD_parallel_loop, StartLoc, EndLoc,
6185
43
                         CollapsedNum) {}
6186
6187
  /// Build an empty directive.
6188
  ///
6189
  /// \param CollapsedNum Number of collapsed nested loops.
6190
  ///
6191
  explicit OMPParallelGenericLoopDirective(unsigned CollapsedNum)
6192
8
      : OMPLoopDirective(OMPParallelGenericLoopDirectiveClass,
6193
8
                         llvm::omp::OMPD_parallel_loop, SourceLocation(),
6194
8
                         SourceLocation(), CollapsedNum) {}
6195
6196
public:
6197
  /// Creates directive with a list of \p Clauses.
6198
  ///
6199
  /// \param C AST context.
6200
  /// \param StartLoc Starting location of the directive kind.
6201
  /// \param EndLoc Ending Location of the directive.
6202
  /// \param CollapsedNum Number of collapsed loops.
6203
  /// \param Clauses List of clauses.
6204
  /// \param AssociatedStmt Statement, associated with the directive.
6205
  /// \param Exprs Helper expressions for CodeGen.
6206
  ///
6207
  static OMPParallelGenericLoopDirective *
6208
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6209
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6210
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
6211
6212
  /// Creates an empty directive with the place
6213
  /// for \a NumClauses clauses.
6214
  ///
6215
  /// \param C AST context.
6216
  /// \param CollapsedNum Number of collapsed nested loops.
6217
  /// \param NumClauses Number of clauses.
6218
  ///
6219
  static OMPParallelGenericLoopDirective *CreateEmpty(const ASTContext &C,
6220
                                                      unsigned NumClauses,
6221
                                                      unsigned CollapsedNum,
6222
                                                      EmptyShell);
6223
6224
7
  static bool classof(const Stmt *T) {
6225
7
    return T->getStmtClass() == OMPParallelGenericLoopDirectiveClass;
6226
7
  }
6227
};
6228
6229
/// This represents '#pragma omp target parallel loop' directive.
6230
///
6231
/// \code
6232
/// #pragma omp target parallel loop private(a,b) order(concurrent)
6233
/// \endcode
6234
/// In this example directive '#pragma omp target parallel loop' has
6235
/// clauses 'private' with the variables 'a' and 'b', and order(concurrent).
6236
///
6237
class OMPTargetParallelGenericLoopDirective final : public OMPLoopDirective {
6238
  friend class ASTStmtReader;
6239
  friend class OMPExecutableDirective;
6240
  /// Build directive with the given start and end location.
6241
  ///
6242
  /// \param StartLoc Starting location of the directive kind.
6243
  /// \param EndLoc Ending location of the directive.
6244
  /// \param CollapsedNum Number of collapsed nested loops.
6245
  ///
6246
  OMPTargetParallelGenericLoopDirective(SourceLocation StartLoc,
6247
                                        SourceLocation EndLoc,
6248
                                        unsigned CollapsedNum)
6249
865
      : OMPLoopDirective(OMPTargetParallelGenericLoopDirectiveClass,
6250
865
                         llvm::omp::OMPD_target_parallel_loop, StartLoc, EndLoc,
6251
865
                         CollapsedNum) {}
6252
6253
  /// Build an empty directive.
6254
  ///
6255
  /// \param CollapsedNum Number of collapsed nested loops.
6256
  ///
6257
  explicit OMPTargetParallelGenericLoopDirective(unsigned CollapsedNum)
6258
211
      : OMPLoopDirective(OMPTargetParallelGenericLoopDirectiveClass,
6259
211
                         llvm::omp::OMPD_target_parallel_loop, SourceLocation(),
6260
211
                         SourceLocation(), CollapsedNum) {}
6261
6262
public:
6263
  /// Creates directive with a list of \p Clauses.
6264
  ///
6265
  /// \param C AST context.
6266
  /// \param StartLoc Starting location of the directive kind.
6267
  /// \param EndLoc Ending Location of the directive.
6268
  /// \param CollapsedNum Number of collapsed loops.
6269
  /// \param Clauses List of clauses.
6270
  /// \param AssociatedStmt Statement, associated with the directive.
6271
  /// \param Exprs Helper expressions for CodeGen.
6272
  ///
6273
  static OMPTargetParallelGenericLoopDirective *
6274
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6275
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6276
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
6277
6278
  /// Creates an empty directive with the place
6279
  /// for \a NumClauses clauses.
6280
  ///
6281
  /// \param C AST context.
6282
  /// \param CollapsedNum Number of collapsed nested loops.
6283
  /// \param NumClauses Number of clauses.
6284
  ///
6285
  static OMPTargetParallelGenericLoopDirective *
6286
  CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
6287
              EmptyShell);
6288
6289
607
  static bool classof(const Stmt *T) {
6290
607
    return T->getStmtClass() == OMPTargetParallelGenericLoopDirectiveClass;
6291
607
  }
6292
};
6293
6294
/// This represents '#pragma omp error' directive.
6295
///
6296
/// \code
6297
/// #pragma omp error
6298
/// \endcode
6299
class OMPErrorDirective final : public OMPExecutableDirective {
6300
  friend class ASTStmtReader;
6301
  friend class OMPExecutableDirective;
6302
  /// Build directive with the given start and end location.
6303
  ///
6304
  /// \param StartLoc Starting location of the directive kind.
6305
  /// \param EndLoc Ending location of the directive.
6306
  ///
6307
  OMPErrorDirective(SourceLocation StartLoc, SourceLocation EndLoc)
6308
80
      : OMPExecutableDirective(OMPErrorDirectiveClass, llvm::omp::OMPD_error,
6309
80
                               StartLoc, EndLoc) {}
6310
  /// Build an empty directive.
6311
  ///
6312
  explicit OMPErrorDirective()
6313
10
      : OMPExecutableDirective(OMPErrorDirectiveClass, llvm::omp::OMPD_error,
6314
10
                               SourceLocation(), SourceLocation()) {}
6315
6316
public:
6317
  ///
6318
  /// \param C AST context.
6319
  /// \param StartLoc Starting location of the directive kind.
6320
  /// \param EndLoc Ending Location of the directive.
6321
  /// \param Clauses List of clauses.
6322
  ///
6323
  static OMPErrorDirective *Create(const ASTContext &C, SourceLocation StartLoc,
6324
                                   SourceLocation EndLoc,
6325
                                   ArrayRef<OMPClause *> Clauses);
6326
6327
  /// Creates an empty directive.
6328
  ///
6329
  /// \param C AST context.
6330
  ///
6331
  static OMPErrorDirective *CreateEmpty(const ASTContext &C,
6332
                                        unsigned NumClauses, EmptyShell);
6333
6334
33
  static bool classof(const Stmt *T) {
6335
33
    return T->getStmtClass() == OMPErrorDirectiveClass;
6336
33
  }
6337
};
6338
} // end namespace clang
6339
6340
#endif