@@ -233,11 +233,11 @@ template <class T> class OSSVarListClause : public OSSClause {
233233// / This represents 'if' clause in the '#pragma omp ...' directive.
234234// /
235235// / \code
236- // / #pragma omp parallel if(parallel: a > 5)
236+ // / #pragma omp task if(a > 5)
237237// / \endcode
238- // / In this example directive '#pragma omp parallel ' has simple 'if' clause with
239- // / condition 'a > 5' and directive name modifier 'parallel '.
240- class OSSIfClause : public OSSClause , public OSSClauseWithPreInit {
238+ // / In this example directive '#pragma omp task ' has simple 'if'
239+ // / clause with condition 'a > 5'.
240+ class OSSIfClause : public OSSClause {
241241 friend class OSSClauseReader ;
242242
243243 // / Location of '('.
@@ -246,73 +246,34 @@ class OSSIfClause : public OSSClause, public OSSClauseWithPreInit {
246246 // / Condition of the 'if' clause.
247247 Stmt *Condition = nullptr ;
248248
249- // / Location of ':' (if any).
250- SourceLocation ColonLoc;
251-
252- // / Directive name modifier for the clause.
253- OmpSsDirectiveKind NameModifier = OSSD_unknown;
254-
255- // / Name modifier location.
256- SourceLocation NameModifierLoc;
257-
258249 // / Set condition.
259250 void setCondition (Expr *Cond) { Condition = Cond; }
260251
261- // / Set directive name modifier for the clause.
262- void setNameModifier (OmpSsDirectiveKind NM) { NameModifier = NM; }
263-
264- // / Set location of directive name modifier for the clause.
265- void setNameModifierLoc (SourceLocation Loc) { NameModifierLoc = Loc; }
266-
267- // / Set location of ':'.
268- void setColonLoc (SourceLocation Loc) { ColonLoc = Loc; }
269-
270252public:
271253 // / Build 'if' clause with condition \a Cond.
272254 // /
273- // / \param NameModifier [OmpSs 4.1] Directive name modifier of clause.
274- // / \param Cond Condition of the clause.
275- // / \param HelperCond Helper condition for the clause.
276- // / \param CaptureRegion Innermost OmpSs region where expressions in this
277- // / clause must be captured.
278255 // / \param StartLoc Starting location of the clause.
279256 // / \param LParenLoc Location of '('.
280- // / \param NameModifierLoc Location of directive name modifier.
281- // / \param ColonLoc [OmpSs 4.1] Location of ':'.
257+ // / \param Cond Condition of the clause.
282258 // / \param EndLoc Ending location of the clause.
283- OSSIfClause (OmpSsDirectiveKind NameModifier, Expr *Cond, Stmt *HelperCond,
284- OmpSsDirectiveKind CaptureRegion, SourceLocation StartLoc,
285- SourceLocation LParenLoc, SourceLocation NameModifierLoc,
286- SourceLocation ColonLoc, SourceLocation EndLoc)
287- : OSSClause(OSSC_if, StartLoc, EndLoc), OSSClauseWithPreInit(this ),
288- LParenLoc (LParenLoc), Condition(Cond), ColonLoc(ColonLoc),
289- NameModifier(NameModifier), NameModifierLoc(NameModifierLoc) {
290- setPreInitStmt (HelperCond, CaptureRegion);
291- }
259+ OSSIfClause (Expr *Cond, SourceLocation StartLoc, SourceLocation LParenLoc,
260+ SourceLocation EndLoc)
261+ : OSSClause(OSSC_if, StartLoc, EndLoc), LParenLoc(LParenLoc),
262+ Condition (Cond) {}
292263
293264 // / Build an empty clause.
294265 OSSIfClause ()
295- : OSSClause(OSSC_if, SourceLocation(), SourceLocation()),
296- OSSClauseWithPreInit(this ) {}
266+ : OSSClause(OSSC_if, SourceLocation(), SourceLocation()) {}
297267
298268 // / Sets the location of '('.
299269 void setLParenLoc (SourceLocation Loc) { LParenLoc = Loc; }
300270
301271 // / Returns the location of '('.
302272 SourceLocation getLParenLoc () const { return LParenLoc; }
303273
304- // / Return the location of ':'.
305- SourceLocation getColonLoc () const { return ColonLoc; }
306-
307274 // / Returns condition.
308275 Expr *getCondition () const { return cast_or_null<Expr>(Condition); }
309276
310- // / Return directive name modifier associated with the clause.
311- OmpSsDirectiveKind getNameModifier () const { return NameModifier; }
312-
313- // / Return the location of directive name modifier.
314- SourceLocation getNameModifierLoc () const { return NameModifierLoc; }
315-
316277 child_range children () { return child_range (&Condition, &Condition + 1 ); }
317278
318279 static bool classof (const OSSClause *T) {
@@ -333,7 +294,7 @@ class OSSFinalClause : public OSSClause {
333294 // / Location of '('.
334295 SourceLocation LParenLoc;
335296
336- // / Condition of the 'if ' clause.
297+ // / Condition of the 'final ' clause.
337298 Stmt *Condition = nullptr ;
338299
339300 // / Set condition.
0 commit comments