@@ -293,7 +293,7 @@ class OpenACCDeviceTypeClause final
293
293
" Only a single asterisk version is permitted, and must be the "
294
294
" only one" );
295
295
296
- llvm::uninitialized_copy (Archs, getTrailingObjects<DeviceTypeArgument> ());
296
+ llvm::uninitialized_copy (Archs, getTrailingObjects ());
297
297
}
298
298
299
299
public:
@@ -307,8 +307,7 @@ class OpenACCDeviceTypeClause final
307
307
}
308
308
309
309
ArrayRef<DeviceTypeArgument> getArchitectures () const {
310
- return ArrayRef<DeviceTypeArgument>(
311
- getTrailingObjects<DeviceTypeArgument>(), NumArchs);
310
+ return getTrailingObjects<DeviceTypeArgument>(NumArchs);
312
311
}
313
312
314
313
static OpenACCDeviceTypeClause *
@@ -421,9 +420,7 @@ class OpenACCSelfClause final
421
420
422
421
// Intentionally internal, meant to be an implementation detail of everything
423
422
// else. All non-internal uses should go through getConditionExpr/getVarList.
424
- llvm::ArrayRef<Expr *> getExprs () const {
425
- return {getTrailingObjects<Expr *>(), NumExprs};
426
- }
423
+ ArrayRef<Expr *> getExprs () const { return getTrailingObjects (NumExprs); }
427
424
428
425
public:
429
426
static bool classof (const OpenACCClause *C) {
@@ -472,8 +469,8 @@ class OpenACCSelfClause final
472
469
473
470
child_range children () {
474
471
return child_range (
475
- reinterpret_cast <Stmt **>(getTrailingObjects<Expr *> ()),
476
- reinterpret_cast <Stmt **>(getTrailingObjects<Expr *> () + NumExprs));
472
+ reinterpret_cast <Stmt **>(getTrailingObjects ()),
473
+ reinterpret_cast <Stmt **>(getTrailingObjects () + NumExprs));
477
474
}
478
475
479
476
const_child_range children () const {
@@ -546,10 +543,10 @@ class OpenACCWaitClause final
546
543
QueuesLoc (QueuesLoc) {
547
544
// The first element of the trailing storage is always the devnum expr,
548
545
// whether it is used or not.
549
- auto *Exprs = getTrailingObjects<Expr *> ();
546
+ auto *Exprs = getTrailingObjects ();
550
547
llvm::uninitialized_copy (ArrayRef (DevNumExpr), Exprs);
551
548
llvm::uninitialized_copy (QueueIdExprs, Exprs + 1 );
552
- setExprs (getTrailingObjects<Expr *> (QueueIdExprs.size () + 1 ));
549
+ setExprs (getTrailingObjects (QueueIdExprs.size () + 1 ));
553
550
}
554
551
555
552
public:
@@ -586,7 +583,7 @@ class OpenACCNumGangsClause final
586
583
ArrayRef<Expr *> IntExprs, SourceLocation EndLoc)
587
584
: OpenACCClauseWithExprs(OpenACCClauseKind::NumGangs, BeginLoc, LParenLoc,
588
585
EndLoc) {
589
- setExprs (getTrailingObjects<Expr *> (IntExprs.size ()), IntExprs);
586
+ setExprs (getTrailingObjects (IntExprs.size ()), IntExprs);
590
587
}
591
588
592
589
public:
@@ -614,7 +611,7 @@ class OpenACCTileClause final
614
611
ArrayRef<Expr *> SizeExprs, SourceLocation EndLoc)
615
612
: OpenACCClauseWithExprs(OpenACCClauseKind::Tile, BeginLoc, LParenLoc,
616
613
EndLoc) {
617
- setExprs (getTrailingObjects<Expr *> (SizeExprs.size ()), SizeExprs);
614
+ setExprs (getTrailingObjects (SizeExprs.size ()), SizeExprs);
618
615
}
619
616
620
617
public:
@@ -851,7 +848,7 @@ class OpenACCPrivateClause final
851
848
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
852
849
: OpenACCClauseWithVarList(OpenACCClauseKind::Private, BeginLoc,
853
850
LParenLoc, EndLoc) {
854
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
851
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
855
852
}
856
853
857
854
public:
@@ -872,7 +869,7 @@ class OpenACCFirstPrivateClause final
872
869
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
873
870
: OpenACCClauseWithVarList(OpenACCClauseKind::FirstPrivate, BeginLoc,
874
871
LParenLoc, EndLoc) {
875
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
872
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
876
873
}
877
874
878
875
public:
@@ -893,7 +890,7 @@ class OpenACCDevicePtrClause final
893
890
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
894
891
: OpenACCClauseWithVarList(OpenACCClauseKind::DevicePtr, BeginLoc,
895
892
LParenLoc, EndLoc) {
896
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
893
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
897
894
}
898
895
899
896
public:
@@ -914,7 +911,7 @@ class OpenACCAttachClause final
914
911
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
915
912
: OpenACCClauseWithVarList(OpenACCClauseKind::Attach, BeginLoc, LParenLoc,
916
913
EndLoc) {
917
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
914
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
918
915
}
919
916
920
917
public:
@@ -935,7 +932,7 @@ class OpenACCDetachClause final
935
932
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
936
933
: OpenACCClauseWithVarList(OpenACCClauseKind::Detach, BeginLoc, LParenLoc,
937
934
EndLoc) {
938
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
935
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
939
936
}
940
937
941
938
public:
@@ -956,7 +953,7 @@ class OpenACCDeleteClause final
956
953
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
957
954
: OpenACCClauseWithVarList(OpenACCClauseKind::Delete, BeginLoc, LParenLoc,
958
955
EndLoc) {
959
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
956
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
960
957
}
961
958
962
959
public:
@@ -977,7 +974,7 @@ class OpenACCUseDeviceClause final
977
974
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
978
975
: OpenACCClauseWithVarList(OpenACCClauseKind::UseDevice, BeginLoc,
979
976
LParenLoc, EndLoc) {
980
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
977
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
981
978
}
982
979
983
980
public:
@@ -998,7 +995,7 @@ class OpenACCNoCreateClause final
998
995
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
999
996
: OpenACCClauseWithVarList(OpenACCClauseKind::NoCreate, BeginLoc,
1000
997
LParenLoc, EndLoc) {
1001
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
998
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1002
999
}
1003
1000
1004
1001
public:
@@ -1019,7 +1016,7 @@ class OpenACCPresentClause final
1019
1016
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
1020
1017
: OpenACCClauseWithVarList(OpenACCClauseKind::Present, BeginLoc,
1021
1018
LParenLoc, EndLoc) {
1022
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1019
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1023
1020
}
1024
1021
1025
1022
public:
@@ -1039,7 +1036,7 @@ class OpenACCHostClause final
1039
1036
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
1040
1037
: OpenACCClauseWithVarList(OpenACCClauseKind::Host, BeginLoc, LParenLoc,
1041
1038
EndLoc) {
1042
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1039
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1043
1040
}
1044
1041
1045
1042
public:
@@ -1061,7 +1058,7 @@ class OpenACCDeviceClause final
1061
1058
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
1062
1059
: OpenACCClauseWithVarList(OpenACCClauseKind::Device, BeginLoc, LParenLoc,
1063
1060
EndLoc) {
1064
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1061
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1065
1062
}
1066
1063
1067
1064
public:
@@ -1088,7 +1085,7 @@ class OpenACCCopyClause final
1088
1085
Spelling == OpenACCClauseKind::PCopy ||
1089
1086
Spelling == OpenACCClauseKind::PresentOrCopy) &&
1090
1087
" Invalid clause kind for copy-clause" );
1091
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1088
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1092
1089
}
1093
1090
1094
1091
public:
@@ -1121,7 +1118,7 @@ class OpenACCCopyInClause final
1121
1118
Spelling == OpenACCClauseKind::PCopyIn ||
1122
1119
Spelling == OpenACCClauseKind::PresentOrCopyIn) &&
1123
1120
" Invalid clause kind for copyin-clause" );
1124
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1121
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1125
1122
}
1126
1123
1127
1124
public:
@@ -1153,7 +1150,7 @@ class OpenACCCopyOutClause final
1153
1150
Spelling == OpenACCClauseKind::PCopyOut ||
1154
1151
Spelling == OpenACCClauseKind::PresentOrCopyOut) &&
1155
1152
" Invalid clause kind for copyout-clause" );
1156
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1153
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1157
1154
}
1158
1155
1159
1156
public:
@@ -1185,7 +1182,7 @@ class OpenACCCreateClause final
1185
1182
Spelling == OpenACCClauseKind::PCreate ||
1186
1183
Spelling == OpenACCClauseKind::PresentOrCreate) &&
1187
1184
" Invalid clause kind for create-clause" );
1188
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1185
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1189
1186
}
1190
1187
1191
1188
public:
@@ -1214,7 +1211,7 @@ class OpenACCReductionClause final
1214
1211
: OpenACCClauseWithVarList(OpenACCClauseKind::Reduction, BeginLoc,
1215
1212
LParenLoc, EndLoc),
1216
1213
Op (Operator) {
1217
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1214
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1218
1215
}
1219
1216
1220
1217
public:
@@ -1239,7 +1236,7 @@ class OpenACCLinkClause final
1239
1236
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
1240
1237
: OpenACCClauseWithVarList(OpenACCClauseKind::Link, BeginLoc, LParenLoc,
1241
1238
EndLoc) {
1242
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1239
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1243
1240
}
1244
1241
1245
1242
public:
@@ -1262,7 +1259,7 @@ class OpenACCDeviceResidentClause final
1262
1259
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
1263
1260
: OpenACCClauseWithVarList(OpenACCClauseKind::DeviceResident, BeginLoc,
1264
1261
LParenLoc, EndLoc) {
1265
- setExprs (getTrailingObjects<Expr *> (VarList.size ()), VarList);
1262
+ setExprs (getTrailingObjects (VarList.size ()), VarList);
1266
1263
}
1267
1264
1268
1265
public:
0 commit comments