aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Parser/unparse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Parser/unparse.cpp')
-rw-r--r--flang/lib/Parser/unparse.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/flang/lib/Parser/unparse.cpp b/flang/lib/Parser/unparse.cpp
index fc15d46..ef209ff 100644
--- a/flang/lib/Parser/unparse.cpp
+++ b/flang/lib/Parser/unparse.cpp
@@ -2250,6 +2250,11 @@ public:
Walk(std::get<OmpObjectList>(x.t));
Walk(": ", std::get<std::optional<std::list<Modifier>>>(x.t));
}
+ void Unparse(const OmpEnterClause &x) {
+ using Modifier = OmpEnterClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<OmpObjectList>(x.t));
+ }
void Unparse(const OmpFromClause &x) {
using Modifier = OmpFromClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
@@ -2801,16 +2806,16 @@ public:
break;
}
}
- void Unparse(const OmpSectionBlocks &x) {
- for (const auto &y : x.v) {
+ void Unparse(const OpenMPSectionConstruct &x) {
+ if (auto &&dirSpec{
+ std::get<std::optional<OmpDirectiveSpecification>>(x.t)}) {
BeginOpenMP();
- Word("!$OMP SECTION");
+ Word("!$OMP ");
+ Walk(*dirSpec);
Put("\n");
EndOpenMP();
- // y.u is an OpenMPSectionConstruct
- // (y.u).v is Block
- Walk(std::get<OpenMPSectionConstruct>(y.u).v, "");
}
+ Walk(std::get<Block>(x.t), "");
}
void Unparse(const OpenMPSectionsConstruct &x) {
BeginOpenMP();
@@ -2818,7 +2823,7 @@ public:
Walk(std::get<OmpBeginSectionsDirective>(x.t));
Put("\n");
EndOpenMP();
- Walk(std::get<OmpSectionBlocks>(x.t));
+ Walk(std::get<std::list<OpenMPConstruct>>(x.t), "");
BeginOpenMP();
Word("!$OMP END ");
Walk(std::get<OmpEndSectionsDirective>(x.t));
@@ -2986,6 +2991,7 @@ public:
WALK_NESTED_ENUM(UseStmt, ModuleNature) // R1410
WALK_NESTED_ENUM(OmpAdjustArgsClause::OmpAdjustOp, Value) // OMP adjustop
WALK_NESTED_ENUM(OmpAtClause, ActionTime) // OMP at
+ WALK_NESTED_ENUM(OmpAutomapModifier, Value) // OMP automap-modifier
WALK_NESTED_ENUM(OmpBindClause, Binding) // OMP bind
WALK_NESTED_ENUM(OmpProcBindClause, AffinityPolicy) // OMP proc_bind
WALK_NESTED_ENUM(OmpDefaultClause, DataSharingAttribute) // OMP default