@@ -1269,6 +1269,12 @@ class OMPDefaultClause : public OMPClause {
1269
1269
// / Start location of the kind in source code.
1270
1270
SourceLocation KindKwLoc;
1271
1271
1272
+ // / Variable-Category to indicate where Kind is applied
1273
+ OpenMPDefaultClauseVariableCategory VC = OMPC_DEFAULT_VC_all;
1274
+
1275
+ // / Start location of Variable-Category
1276
+ SourceLocation VCLoc;
1277
+
1272
1278
// / Set kind of the clauses.
1273
1279
// /
1274
1280
// / \param K Argument of clause.
@@ -1279,6 +1285,15 @@ class OMPDefaultClause : public OMPClause {
1279
1285
// / \param KLoc Argument location.
1280
1286
void setDefaultKindKwLoc (SourceLocation KLoc) { KindKwLoc = KLoc; }
1281
1287
1288
+ // / Set Variable Category used with the Kind Clause (Default Modifier)
1289
+ void setDefaultVariableCategory (OpenMPDefaultClauseVariableCategory VC) {
1290
+ this ->VC = VC;
1291
+ }
1292
+
1293
+ void setDefaultVariableCategoryLocation (SourceLocation VCLoc) {
1294
+ this ->VCLoc = VCLoc;
1295
+ }
1296
+
1282
1297
public:
1283
1298
// / Build 'default' clause with argument \a A ('none' or 'shared').
1284
1299
// /
@@ -1288,10 +1303,11 @@ class OMPDefaultClause : public OMPClause {
1288
1303
// / \param LParenLoc Location of '('.
1289
1304
// / \param EndLoc Ending location of the clause.
1290
1305
OMPDefaultClause (llvm::omp::DefaultKind A, SourceLocation ALoc,
1306
+ OpenMPDefaultClauseVariableCategory VC, SourceLocation VCLoc,
1291
1307
SourceLocation StartLoc, SourceLocation LParenLoc,
1292
1308
SourceLocation EndLoc)
1293
1309
: OMPClause(llvm::omp::OMPC_default, StartLoc, EndLoc),
1294
- LParenLoc (LParenLoc), Kind(A), KindKwLoc(ALoc) {}
1310
+ LParenLoc (LParenLoc), Kind(A), KindKwLoc(ALoc), VC(VC), VCLoc(VCLoc) {}
1295
1311
1296
1312
// / Build an empty clause.
1297
1313
OMPDefaultClause ()
@@ -1310,6 +1326,10 @@ class OMPDefaultClause : public OMPClause {
1310
1326
// / Returns location of clause kind.
1311
1327
SourceLocation getDefaultKindKwLoc () const { return KindKwLoc; }
1312
1328
1329
+ OpenMPDefaultClauseVariableCategory getDefaultVC () const { return VC; }
1330
+
1331
+ SourceLocation getDefaultVCLoc () const { return VCLoc; }
1332
+
1313
1333
child_range children () {
1314
1334
return child_range (child_iterator (), child_iterator ());
1315
1335
}
0 commit comments