@@ -156,7 +156,7 @@ class OMPLoopScope : public CodeGenFunction::RunCleanupsScope {
156
156
}
157
157
// Mark private vars as undefs.
158
158
for (const auto *C : LD->getClausesOfKind <OMPPrivateClause>()) {
159
- for (const Expr *IRef : C->varlists ()) {
159
+ for (const Expr *IRef : C->varlist ()) {
160
160
const auto *OrigVD =
161
161
cast<VarDecl>(cast<DeclRefExpr>(IRef)->getDecl ());
162
162
if (EmittedAsPrivate.insert (OrigVD->getCanonicalDecl ()).second ) {
@@ -257,13 +257,13 @@ class OMPSimdLexicalScope : public CodeGenFunction::LexicalScope {
257
257
}
258
258
}
259
259
} else if (const auto *UDP = dyn_cast<OMPUseDevicePtrClause>(C)) {
260
- for (const Expr *E : UDP->varlists ()) {
260
+ for (const Expr *E : UDP->varlist ()) {
261
261
const Decl *D = cast<DeclRefExpr>(E)->getDecl ();
262
262
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
263
263
CGF.EmitVarDecl (*OED);
264
264
}
265
265
} else if (const auto *UDP = dyn_cast<OMPUseDeviceAddrClause>(C)) {
266
- for (const Expr *E : UDP->varlists ()) {
266
+ for (const Expr *E : UDP->varlist ()) {
267
267
const Decl *D = getBaseDecl (E);
268
268
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
269
269
CGF.EmitVarDecl (*OED);
@@ -865,7 +865,7 @@ bool CodeGenFunction::EmitOMPFirstprivateClause(const OMPExecutableDirective &D,
865
865
bool FirstprivateIsLastprivate = false ;
866
866
llvm::DenseMap<const VarDecl *, OpenMPLastprivateModifier> Lastprivates;
867
867
for (const auto *C : D.getClausesOfKind <OMPLastprivateClause>()) {
868
- for (const auto *D : C->varlists ())
868
+ for (const auto *D : C->varlist ())
869
869
Lastprivates.try_emplace (
870
870
cast<VarDecl>(cast<DeclRefExpr>(D)->getDecl ())->getCanonicalDecl (),
871
871
C->getKind ());
@@ -1545,7 +1545,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
1545
1545
return ;
1546
1546
llvm::DenseSet<CanonicalDeclPtr<const VarDecl>> PrivateDecls;
1547
1547
for (const auto *C : S.getClausesOfKind <OMPReductionClause>()) {
1548
- for (const Expr *Ref : C->varlists ()) {
1548
+ for (const Expr *Ref : C->varlist ()) {
1549
1549
if (!Ref->getType ()->isScalarType ())
1550
1550
continue ;
1551
1551
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts ());
@@ -1556,7 +1556,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
1556
1556
}
1557
1557
}
1558
1558
for (const auto *C : S.getClausesOfKind <OMPLastprivateClause>()) {
1559
- for (const Expr *Ref : C->varlists ()) {
1559
+ for (const Expr *Ref : C->varlist ()) {
1560
1560
if (!Ref->getType ()->isScalarType ())
1561
1561
continue ;
1562
1562
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts ());
@@ -1567,7 +1567,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
1567
1567
}
1568
1568
}
1569
1569
for (const auto *C : S.getClausesOfKind <OMPLinearClause>()) {
1570
- for (const Expr *Ref : C->varlists ()) {
1570
+ for (const Expr *Ref : C->varlist ()) {
1571
1571
if (!Ref->getType ()->isScalarType ())
1572
1572
continue ;
1573
1573
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts ());
@@ -1582,7 +1582,7 @@ checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
1582
1582
// Firstprivates do not return value but may be passed by reference - no need
1583
1583
// to check for updated lastprivate conditional.
1584
1584
for (const auto *C : S.getClausesOfKind <OMPFirstprivateClause>()) {
1585
- for (const Expr *Ref : C->varlists ()) {
1585
+ for (const Expr *Ref : C->varlist ()) {
1586
1586
if (!Ref->getType ()->isScalarType ())
1587
1587
continue ;
1588
1588
const auto *DRE = dyn_cast<DeclRefExpr>(Ref->IgnoreParenImpCasts ());
@@ -2288,7 +2288,7 @@ static void emitAlignedClause(CodeGenFunction &CGF,
2288
2288
cast<llvm::ConstantInt>(CGF.EmitScalarExpr (AlignmentExpr));
2289
2289
ClauseAlignment = AlignmentCI->getValue ();
2290
2290
}
2291
- for (const Expr *E : Clause->varlists ()) {
2291
+ for (const Expr *E : Clause->varlist ()) {
2292
2292
llvm::APInt Alignment (ClauseAlignment);
2293
2293
if (Alignment == 0 ) {
2294
2294
// OpenMP [2.8.1, Description]
@@ -2407,7 +2407,7 @@ void CodeGenFunction::EmitOMPLinearClause(
2407
2407
}
2408
2408
for (const auto *C : D.getClausesOfKind <OMPLinearClause>()) {
2409
2409
auto CurPrivate = C->privates ().begin ();
2410
- for (const Expr *E : C->varlists ()) {
2410
+ for (const Expr *E : C->varlist ()) {
2411
2411
const auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl ());
2412
2412
const auto *PrivateVD =
2413
2413
cast<VarDecl>(cast<DeclRefExpr>(*CurPrivate)->getDecl ());
@@ -2711,7 +2711,7 @@ GetAlignedMapping(const OMPLoopDirective &S, CodeGenFunction &CGF) {
2711
2711
cast<llvm::ConstantInt>(CGF.EmitScalarExpr (AlignmentExpr));
2712
2712
ClauseAlignment = AlignmentCI->getValue ();
2713
2713
}
2714
- for (const Expr *E : Clause->varlists ()) {
2714
+ for (const Expr *E : Clause->varlist ()) {
2715
2715
llvm::APInt Alignment (ClauseAlignment);
2716
2716
if (Alignment == 0 ) {
2717
2717
// OpenMP [2.8.1, Description]
@@ -4329,7 +4329,7 @@ void CodeGenFunction::EmitOMPSingleDirective(const OMPSingleDirective &S) {
4329
4329
// Build a list of copyprivate variables along with helper expressions
4330
4330
// (<source>, <destination>, <destination>=<source> expressions)
4331
4331
for (const auto *C : S.getClausesOfKind <OMPCopyprivateClause>()) {
4332
- CopyprivateVars.append (C->varlists (). begin () , C->varlists (). end ());
4332
+ CopyprivateVars.append (C->varlist_begin () , C->varlist_end ());
4333
4333
DestExprs.append (C->destination_exprs ().begin (),
4334
4334
C->destination_exprs ().end ());
4335
4335
SrcExprs.append (C->source_exprs ().begin (), C->source_exprs ().end ());
@@ -5035,7 +5035,7 @@ void CodeGenFunction::EmitOMPTaskBasedDirective(
5035
5035
auto IPriv = C->privates ().begin ();
5036
5036
auto IRed = C->reduction_ops ().begin ();
5037
5037
auto ITD = C->taskgroup_descriptors ().begin ();
5038
- for (const Expr *Ref : C->varlists ()) {
5038
+ for (const Expr *Ref : C->varlist ()) {
5039
5039
InRedVars.emplace_back (Ref);
5040
5040
InRedPrivs.emplace_back (*IPriv);
5041
5041
InRedOps.emplace_back (*IRed);
@@ -5318,7 +5318,7 @@ void CodeGenFunction::processInReduction(const OMPExecutableDirective &S,
5318
5318
auto IPriv = C->privates ().begin ();
5319
5319
auto IRed = C->reduction_ops ().begin ();
5320
5320
auto ITD = C->taskgroup_descriptors ().begin ();
5321
- for (const Expr *Ref : C->varlists ()) {
5321
+ for (const Expr *Ref : C->varlist ()) {
5322
5322
InRedVars.emplace_back (Ref);
5323
5323
InRedPrivs.emplace_back (*IPriv);
5324
5324
InRedOps.emplace_back (*IRed);
@@ -7346,7 +7346,7 @@ void CodeGenFunction::EmitOMPUseDevicePtrClause(
7346
7346
const llvm::DenseMap<const ValueDecl *, llvm::Value *>
7347
7347
CaptureDeviceAddrMap) {
7348
7348
llvm::SmallDenseSet<CanonicalDeclPtr<const Decl>, 4 > Processed;
7349
- for (const Expr *OrigVarIt : C.varlists ()) {
7349
+ for (const Expr *OrigVarIt : C.varlist ()) {
7350
7350
const auto *OrigVD = cast<VarDecl>(cast<DeclRefExpr>(OrigVarIt)->getDecl ());
7351
7351
if (!Processed.insert (OrigVD).second )
7352
7352
continue ;
@@ -7397,7 +7397,7 @@ void CodeGenFunction::EmitOMPUseDeviceAddrClause(
7397
7397
const llvm::DenseMap<const ValueDecl *, llvm::Value *>
7398
7398
CaptureDeviceAddrMap) {
7399
7399
llvm::SmallDenseSet<CanonicalDeclPtr<const Decl>, 4 > Processed;
7400
- for (const Expr *Ref : C.varlists ()) {
7400
+ for (const Expr *Ref : C.varlist ()) {
7401
7401
const VarDecl *OrigVD = getBaseDecl (Ref);
7402
7402
if (!Processed.insert (OrigVD).second )
7403
7403
continue ;
@@ -7494,13 +7494,13 @@ void CodeGenFunction::EmitOMPTargetDataDirective(
7494
7494
if (CGM.getLangOpts ().OMPTargetTriples .empty ()) {
7495
7495
// Emit helper decls of the use_device_ptr/use_device_addr clauses.
7496
7496
for (const auto *C : S.getClausesOfKind <OMPUseDevicePtrClause>())
7497
- for (const Expr *E : C->varlists ()) {
7497
+ for (const Expr *E : C->varlist ()) {
7498
7498
const Decl *D = cast<DeclRefExpr>(E)->getDecl ();
7499
7499
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
7500
7500
CGF.EmitVarDecl (*OED);
7501
7501
}
7502
7502
for (const auto *C : S.getClausesOfKind <OMPUseDeviceAddrClause>())
7503
- for (const Expr *E : C->varlists ()) {
7503
+ for (const Expr *E : C->varlist ()) {
7504
7504
const Decl *D = getBaseDecl (E);
7505
7505
if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
7506
7506
CGF.EmitVarDecl (*OED);
@@ -8232,7 +8232,7 @@ void CodeGenFunction::EmitSimpleOMPExecutableDirective(
8232
8232
if (isOpenMPTaskingDirective (D.getDirectiveKind ())) {
8233
8233
// Capture global firstprivates to avoid crash.
8234
8234
for (const auto *C : D.getClausesOfKind <OMPFirstprivateClause>()) {
8235
- for (const Expr *Ref : C->varlists ()) {
8235
+ for (const Expr *Ref : C->varlist ()) {
8236
8236
const auto *DRE = cast<DeclRefExpr>(Ref->IgnoreParenImpCasts ());
8237
8237
if (!DRE)
8238
8238
continue ;
0 commit comments