Skip to content

Commit 3a6b818

Browse files
authored
[flang][OpenMP] Expand top-level WRAPPER_CLASSs into struct, NFC (llvm#162723)
Most of the time OpenMP types use WRAPPER_CLASS_BOILERPLATE inside of a struct definition. Expand the few remaining cases of WRAPPER_CLASS to use the same form everywhere.
1 parent a4015d9 commit 3a6b818

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

flang/include/flang/Parser/parse-tree.h

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3517,7 +3517,9 @@ struct OmpObject {
35173517
std::variant<Designator, /*common block*/ Name, Invalid> u;
35183518
};
35193519

3520-
WRAPPER_CLASS(OmpObjectList, std::list<OmpObject>);
3520+
struct OmpObjectList {
3521+
WRAPPER_CLASS_BOILERPLATE(OmpObjectList, std::list<OmpObject>);
3522+
};
35213523

35223524
// Ref: [4.5:201-207], [5.0:293-299], [5.1:325-331], [5.2:124]
35233525
//
@@ -3547,14 +3549,18 @@ struct OmpTypeSpecifier {
35473549
std::variant<TypeSpec, DeclarationTypeSpec> u;
35483550
};
35493551

3550-
WRAPPER_CLASS(OmpTypeNameList, std::list<OmpTypeSpecifier>);
3552+
struct OmpTypeNameList {
3553+
WRAPPER_CLASS_BOILERPLATE(OmpTypeNameList, std::list<OmpTypeSpecifier>);
3554+
};
35513555

35523556
struct OmpLocator {
35533557
UNION_CLASS_BOILERPLATE(OmpLocator);
35543558
std::variant<OmpObject, FunctionReference> u;
35553559
};
35563560

3557-
WRAPPER_CLASS(OmpLocatorList, std::list<OmpLocator>);
3561+
struct OmpLocatorList {
3562+
WRAPPER_CLASS_BOILERPLATE(OmpLocatorList, std::list<OmpLocator>);
3563+
};
35583564

35593565
// Ref: [4.5:58-60], [5.0:58-60], [5.1:63-68], [5.2:197-198], [6.0:334-336]
35603566
//
@@ -4324,7 +4330,9 @@ struct OmpIteration {
43244330
//
43254331
// iteration-vector ->
43264332
// [iteration...] // since 4.5
4327-
WRAPPER_CLASS(OmpIterationVector, std::list<OmpIteration>);
4333+
struct OmpIterationVector {
4334+
WRAPPER_CLASS_BOILERPLATE(OmpIterationVector, std::list<OmpIteration>);
4335+
};
43284336

43294337
// Extract this into a separate structure (instead of having it directly in
43304338
// OmpDoacrossClause), so that the context in TYPE_CONTEXT_PARSER can be set
@@ -4364,14 +4372,18 @@ struct OmpDependClause {
43644372
//
43654373
// doacross-clause ->
43664374
// DOACROSS(dependence-type: iteration-vector) // since 5.2
4367-
WRAPPER_CLASS(OmpDoacrossClause, OmpDoacross);
4375+
struct OmpDoacrossClause {
4376+
WRAPPER_CLASS_BOILERPLATE(OmpDoacrossClause, OmpDoacross);
4377+
};
43684378

43694379
// Ref: [5.0:254-255], [5.1:287-288], [5.2:73]
43704380
//
43714381
// destroy-clause ->
43724382
// DESTROY | // since 5.0, until 5.1
43734383
// DESTROY(variable) // since 5.2
4374-
WRAPPER_CLASS(OmpDestroyClause, OmpObject);
4384+
struct OmpDestroyClause {
4385+
WRAPPER_CLASS_BOILERPLATE(OmpDestroyClause, OmpObject);
4386+
};
43754387

43764388
// Ref: [5.0:135-140], [5.1:161-166], [5.2:265-266]
43774389
//
@@ -4785,7 +4797,9 @@ struct OmpInitClause {
47854797
// REF: [5.1:217-220], [5.2:294]
47864798
//
47874799
// 14.1.3 use-clause -> USE (interop-var)
4788-
WRAPPER_CLASS(OmpUseClause, OmpObject);
4800+
struct OmpUseClause {
4801+
WRAPPER_CLASS_BOILERPLATE(OmpUseClause, OmpObject);
4802+
};
47894803

47904804
// OpenMP Clauses
47914805
struct OmpClause {

0 commit comments

Comments
 (0)