[flang-commits] [flang] [flang][OpenMP] Order Unparse functions for OpenMP classes, NFC (PR #173391)
via flang-commits
flang-commits at lists.llvm.org
Tue Dec 23 08:00:45 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-parser
Author: Krzysztof Parzyszek (kparzysz)
<details>
<summary>Changes</summary>
---
Patch is 31.12 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/173391.diff
1 Files Affected:
- (modified) flang/lib/Parser/unparse.cpp (+368-374)
``````````diff
diff --git a/flang/lib/Parser/unparse.cpp b/flang/lib/Parser/unparse.cpp
index 19680dee7568d..1fb03c28d10a3 100644
--- a/flang/lib/Parser/unparse.cpp
+++ b/flang/lib/Parser/unparse.cpp
@@ -2119,33 +2119,134 @@ class UnparseVisitor {
}
// OpenMP Clauses & Directives
+#define GEN_FLANG_CLAUSE_UNPARSE
+#include "llvm/Frontend/OpenMP/OMP.inc"
+ bool Pre(const OmpMessageClause &x) {
+ Walk(x.v);
+ return false;
+ }
+ void Unparse(const llvm::omp::Directive &x) {
+ unsigned ompVersion{langOpts_.OpenMPVersion};
+ Word(llvm::omp::getOpenMPDirectiveName(x, ompVersion).str());
+ }
+ void Unparse(const OmpAbsentClause &x) { Walk("", x.v, ","); }
+ void Unparse(const OmpAdjustArgsClause &x) {
+ Walk(std::get<OmpAdjustArgsClause::OmpAdjustOp>(x.t).v);
+ Put(":");
+ Walk(std::get<parser::OmpObjectList>(x.t));
+ }
+ void Unparse(const OmpAffinityClause &x) {
+ using Modifier = OmpAffinityClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<OmpObjectList>(x.t));
+ }
+ void Unparse(const OmpAlignedClause &x) {
+ using Modifier = OmpAlignedClause::Modifier;
+ Walk(std::get<OmpObjectList>(x.t));
+ Walk(": ", std::get<std::optional<std::list<Modifier>>>(x.t));
+ }
+ void Unparse(const OmpAlignModifier &x) {
+ Word("ALIGN(");
+ Walk(x.v);
+ Put(")");
+ }
+ void Unparse(const OmpAllocateClause &x) {
+ using Modifier = OmpAllocateClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<OmpObjectList>(x.t));
+ }
+ void Unparse(const OmpAllocateDirective &x) {
+ Unparse(static_cast<const OmpBlockConstruct &>(x));
+ }
+ void Unparse(const OmpAllocatorComplexModifier &x) {
+ Word("ALLOCATOR(");
+ Walk(x.v);
+ Put(")");
+ }
+ void Unparse(const OmpAllocatorSimpleModifier &x) { Walk(x.v); }
+ void Unparse(const OmpAppendArgsClause::OmpAppendOp &x) {
+ Put("INTEROP(");
+ Walk(x.v, ",");
+ Put(")");
+ }
+ void Unparse(const OmpAppendArgsClause &x) { Walk(x.v, ","); }
void Unparse(const OmpArgumentList &x) { Walk(x.v, ", "); }
- void Unparse(const OmpTypeNameList &x) { Walk(x.v, ", "); }
-
+ void Unparse(const OmpAttachModifier &x) {
+ Word("ATTACH(");
+ Walk(x.v);
+ Put(")");
+ }
void Unparse(const OmpBaseVariantNames &x) {
Walk(std::get<0>(x.t)); // OmpObject
Put(":");
Walk(std::get<1>(x.t)); // OmpObject
}
- void Unparse(const OmpMapperSpecifier &x) {
- const auto &mapperName{std::get<std::string>(x.t)};
- if (mapperName.find(llvm::omp::OmpDefaultMapperName) == std::string::npos) {
- Walk(mapperName);
- Put(":");
+ void Unparse(const OmpBeginDirective &x) {
+ BeginOpenMP();
+ Word("!$OMP ");
+ Walk(static_cast<const OmpDirectiveSpecification &>(x));
+ Put("\n");
+ EndOpenMP();
+ }
+ void Unparse(const OmpBeginLoopDirective &x) {
+ Unparse(static_cast<const OmpBeginDirective &>(x));
+ }
+ void Unparse(const OmpBeginSectionsDirective &x) {
+ Unparse(static_cast<const OmpBeginDirective &>(x));
+ }
+ void Unparse(const OmpBlockConstruct &x) {
+ Walk(std::get<OmpBeginDirective>(x.t));
+ Walk(std::get<Block>(x.t), "");
+ if (auto &end{std::get<std::optional<OmpEndDirective>>(x.t)}) {
+ Walk(*end);
+ } else {
+ Put("\n");
}
- Walk(std::get<TypeSpec>(x.t));
- Put("::");
- Walk(std::get<Name>(x.t));
}
- void Unparse(const OmpReductionSpecifier &x) {
- Walk(std::get<OmpReductionIdentifier>(x.t));
- Put(":");
- Walk(std::get<OmpTypeNameList>(x.t));
- Walk(": ", std::get<std::optional<OmpCombinerExpression>>(x.t));
+ // Clause unparsers are usually generated by tablegen in the form
+ // CLAUSE(VALUE). Here we only want to print VALUE so a custom unparser is
+ // needed.
+ void Unparse(const OmpClause::CancellationConstructType &x) { Walk(x.v); }
+ void Unparse(const OmpClauseList &x, const char *sep = " ") {
+ Walk(" ", x.v, sep);
}
- void Unparse(const llvm::omp::Directive &x) {
+ void Unparse(const OmpCombinerExpression &x) {
+ Unparse(static_cast<const OmpStylizedExpression &>(x));
+ }
+ void Unparse(const OmpContainsClause &x) { Walk("", x.v, ","); }
+ void Unparse(const OmpContextSelectorSpecification &x) { Walk(x.v, ", "); }
+ void Unparse(const OmpDeclareVariantDirective &x) {
+ BeginOpenMP();
+ Word("!$OMP ");
+ Walk(x.v);
+ Put("\n");
+ EndOpenMP();
+ }
+ void Unparse(const OmpDefaultmapClause &x) {
+ using Modifier = OmpDefaultmapClause::Modifier;
+ Walk(std::get<OmpDefaultmapClause::ImplicitBehavior>(x.t));
+ Walk(":", std::get<std::optional<std::list<Modifier>>>(x.t));
+ }
+ void Unparse(const OmpDependClause::TaskDep &x) {
+ using Modifier = OmpDependClause::TaskDep::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<OmpObjectList>(x.t));
+ }
+ void Unparse(const OmpDetachClause &x) { Walk(x.v); }
+ void Unparse(const OmpDeviceClause &x) {
+ using Modifier = OmpDeviceClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<ScalarIntExpr>(x.t));
+ }
+ void Unparse(const OmpDimsModifier &x) {
+ Word("DIMS");
+ Put("(");
+ Walk(x.v);
+ Put(")");
+ }
+ void Unparse(const OmpDirectiveNameModifier &x) {
unsigned ompVersion{langOpts_.OpenMPVersion};
- Word(llvm::omp::getOpenMPDirectiveName(x, ompVersion).str());
+ Word(llvm::omp::getOpenMPDirectiveName(x.v, ompVersion));
}
void Unparse(const OmpDirectiveSpecification &x) {
auto unparseArgs{[&]() {
@@ -2172,196 +2273,90 @@ class UnparseVisitor {
unparseClauses();
}
}
- void Unparse(const OmpTraitScore &x) {
- Word("SCORE(");
- Walk(x.v);
- Put(")");
- }
- void Unparse(const OmpTraitPropertyExtension::Complex &x) {
- using PropList = std::list<common::Indirection<OmpTraitPropertyExtension>>;
- Walk(std::get<OmpTraitPropertyName>(x.t));
- Put("(");
- Walk(std::get<PropList>(x.t), ",");
- Put(")");
- }
- void Unparse(const OmpTraitSelector &x) {
- Walk(std::get<OmpTraitSelectorName>(x.t));
- Walk(std::get<std::optional<OmpTraitSelector::Properties>>(x.t));
- }
- void Unparse(const OmpTraitSelector::Properties &x) {
- Put("(");
- Walk(std::get<std::optional<OmpTraitScore>>(x.t), ": ");
- Walk(std::get<std::list<OmpTraitProperty>>(x.t));
- Put(")");
- }
- void Unparse(const OmpTraitSetSelector &x) {
- Walk(std::get<OmpTraitSetSelectorName>(x.t));
- Put("={");
- Walk(std::get<std::list<OmpTraitSelector>>(x.t));
- Put("}");
- }
- void Unparse(const OmpContextSelectorSpecification &x) { Walk(x.v, ", "); }
-
- void Unparse(const OmpObject &x) {
- common::visit( //
- common::visitors{
- [&](const Designator &y) { Walk(y); },
- [&](const Name &y) {
- Put("/");
- Walk(y);
- Put("/");
- },
- [&](const OmpObject::Invalid &y) {
- switch (y.v) {
- case OmpObject::Invalid::Kind::BlankCommonBlock:
- Put("//");
- break;
- }
- },
- },
- x.u);
- }
- void Unparse(const OmpDirectiveNameModifier &x) {
- unsigned ompVersion{langOpts_.OpenMPVersion};
- Word(llvm::omp::getOpenMPDirectiveName(x.v, ompVersion));
+ void Unparse(const OmpDoacross::Sink &x) {
+ Word("SINK: ");
+ Walk(x.v.v);
}
- void Unparse(const OmpDimsModifier &x) {
- Word("DIMS");
- Put("(");
- Walk(x.v);
- Put(")");
+ void Unparse(const OmpDoacross::Source &) { Word("SOURCE"); }
+ void Unparse(const OmpDynGroupprivateClause &x) {
+ using Modifier = OmpDynGroupprivateClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<ScalarIntExpr>(x.t));
}
- void Unparse(const OmpStylizedDeclaration &x) {
- // empty
+ void Unparse(const OmpEndDirective &x) {
+ BeginOpenMP();
+ Word("!$OMP END ");
+ Walk(static_cast<const OmpDirectiveSpecification &>(x));
+ Put("\n");
+ EndOpenMP();
}
- void Unparse(const OmpStylizedExpression &x) { //
- Put(x.source.ToString());
+ void Unparse(const OmpEndLoopDirective &x) {
+ Unparse(static_cast<const OmpEndDirective &>(x));
}
- void Unparse(const OmpStylizedInstance &x) {
- // empty
+ void Unparse(const OmpEndSectionsDirective &x) {
+ Unparse(static_cast<const OmpEndDirective &>(x));
}
- void Unparse(const OmpIteratorSpecifier &x) {
- Walk(std::get<TypeDeclarationStmt>(x.t));
- Put(" = ");
- Walk(std::get<SubscriptTriplet>(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 OmpIterator &x) {
- Word("ITERATOR(");
+ void Unparse(const OmpErrorDirective &x) {
+ BeginOpenMP();
+ Word("!$OMP ");
Walk(x.v);
- Put(")");
+ Put("\n");
+ EndOpenMP();
}
- void Unparse(const OmpMapper &x) {
- Word("MAPPER(");
+ void Unparse(const OmpFailClause &x) { Walk(x.v); }
+ void Unparse(const OmpFallbackModifier &x) {
+ Word("FALLBACK(");
Walk(x.v);
Put(")");
}
- void Unparse(const OmpLastprivateClause &x) {
- using Modifier = OmpLastprivateClause::Modifier;
+ void Unparse(const OmpFromClause &x) {
+ using Modifier = OmpFromClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
Walk(std::get<OmpObjectList>(x.t));
}
- void Unparse(const OmpPreferenceSelector &x) {
- common::visit( //
- common::visitors{
- [&](const OmpPreferenceSelector::ForeignRuntimeIdentifier &s) {
- Word("FR");
- Put("(");
- Walk(s);
- Put(")");
- },
- [&](const OmpPreferenceSelector::Extensions &s) {
- Word("ATTR");
- Put("(");
- Walk(s, ", ");
- Put(")");
- },
- },
- x.u);
- }
- void Unparse(const OmpPreferenceSpecification &x) {
- common::visit( //
- common::visitors{
- [&](const std::list<OmpPreferenceSelector> &s) {
- Put("{");
- Walk(s, ", ");
- Put("}");
- },
- [&](const OmpPreferenceSelector::ForeignRuntimeIdentifier &s) {
- Walk(s);
- },
- },
- x.u);
+ void Unparse(const OmpGrainsizeClause &x) {
+ using Modifier = OmpGrainsizeClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<ScalarIntExpr>(x.t));
}
- void Unparse(const OmpPreferType &x) {
- Word("PREFER_TYPE");
- Put("(");
- Walk(x.v, ", ");
- Put(")");
+ void Unparse(const OmpIfClause &x) {
+ using Modifier = OmpIfClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
+ Walk(std::get<ScalarLogicalExpr>(x.t));
}
void Unparse(const OmpInitClause &x) {
using Modifier = OmpInitClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
Walk(std::get<OmpObject>(x.t));
}
- void Unparse(const OmpMapClause &x) {
- using Modifier = OmpMapClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<OmpObjectList>(x.t));
- }
- void Unparse(const OmpScheduleClause &x) {
- using Modifier = OmpScheduleClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ":");
- Walk(std::get<OmpScheduleClause::Kind>(x.t));
- Walk(",", std::get<std::optional<ScalarIntExpr>>(x.t));
- }
- void Unparse(const OmpDeviceClause &x) {
- using Modifier = OmpDeviceClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<ScalarIntExpr>(x.t));
+ void Unparse(const OmpInitializerExpression &x) {
+ Unparse(static_cast<const OmpStylizedExpression &>(x));
}
- void Unparse(const OmpAbsentClause &x) { Walk("", x.v, ","); }
- void Unparse(const OmpContainsClause &x) { Walk("", x.v, ","); }
- void Unparse(const OmpAffinityClause &x) {
- using Modifier = OmpAffinityClause::Modifier;
+ void Unparse(const OmpInReductionClause &x) {
+ using Modifier = OmpInReductionClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
Walk(std::get<OmpObjectList>(x.t));
}
- void Unparse(const OmpAlignedClause &x) {
- using Modifier = OmpAlignedClause::Modifier;
- Walk(std::get<OmpObjectList>(x.t));
- Walk(": ", std::get<std::optional<std::list<Modifier>>>(x.t));
+ void Unparse(const OmpIteratorSpecifier &x) {
+ Walk(std::get<TypeDeclarationStmt>(x.t));
+ Put(" = ");
+ Walk(std::get<SubscriptTriplet>(x.t));
}
- void Unparse(const OmpFallbackModifier &x) {
- Word("FALLBACK(");
+ void Unparse(const OmpIterator &x) {
+ Word("ITERATOR(");
Walk(x.v);
Put(")");
}
- void Unparse(const OmpDynGroupprivateClause &x) {
- using Modifier = OmpDynGroupprivateClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<ScalarIntExpr>(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;
+ void Unparse(const OmpLastprivateClause &x) {
+ using Modifier = OmpLastprivateClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
Walk(std::get<OmpObjectList>(x.t));
}
- void Unparse(const OmpIfClause &x) {
- using Modifier = OmpIfClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<ScalarLogicalExpr>(x.t));
- }
- void Unparse(const OmpStepSimpleModifier &x) { Walk(x.v); }
- void Unparse(const OmpStepComplexModifier &x) {
- Word("STEP(");
- Walk(x.v);
- Put(")");
- }
void Unparse(const OmpLinearClause &x) {
using Modifier = OmpLinearClause::Modifier;
auto &modifiers{std::get<std::optional<std::list<Modifier>>>(x.t)};
@@ -2421,192 +2416,242 @@ class UnparseVisitor {
Walk(std::get<1>(x.t));
Put(")");
}
- void Unparse(const OmpReductionClause &x) {
- using Modifier = OmpReductionClause::Modifier;
+ void Unparse(const OmpMapClause &x) {
+ using Modifier = OmpMapClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
Walk(std::get<OmpObjectList>(x.t));
}
- void Unparse(const OmpDetachClause &x) { Walk(x.v); }
- void Unparse(const OmpInReductionClause &x) {
- using Modifier = OmpInReductionClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<OmpObjectList>(x.t));
+ void Unparse(const OmpMapperSpecifier &x) {
+ const auto &mapperName{std::get<std::string>(x.t)};
+ if (mapperName.find(llvm::omp::OmpDefaultMapperName) == std::string::npos) {
+ Walk(mapperName);
+ Put(":");
+ }
+ Walk(std::get<TypeSpec>(x.t));
+ Put("::");
+ Walk(std::get<Name>(x.t));
}
- void Unparse(const OmpTaskReductionClause &x) {
- using Modifier = OmpTaskReductionClause::Modifier;
+ void Unparse(const OmpMapper &x) {
+ Word("MAPPER(");
+ Walk(x.v);
+ Put(")");
+ }
+ void Unparse(const OmpMetadirectiveDirective &x) {
+ BeginOpenMP();
+ Word("!$OMP ");
+ Walk(x.v);
+ Put("\n");
+ EndOpenMP();
+ }
+ void Unparse(const OmpNothingDirective &x) {
+ BeginOpenMP();
+ Word("!$OMP ");
+ Walk(x.v);
+ Put("\n");
+ EndOpenMP();
+ }
+ void Unparse(const OmpNumTasksClause &x) {
+ using Modifier = OmpNumTasksClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<OmpObjectList>(x.t));
+ Walk(std::get<ScalarIntExpr>(x.t));
}
- void Unparse(const OmpAllocateClause &x) {
- using Modifier = OmpAllocateClause::Modifier;
+ void Unparse(const OmpNumTeamsClause &x) {
+ using Modifier = OmpNumTeamsClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ":");
+ Walk(std::get<std::list<ScalarIntExpr>>(x.t));
+ }
+ void Unparse(const OmpNumThreadsClause &x) {
+ using Modifier = OmpNumThreadsClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ":");
+ Walk(std::get<std::list<ScalarIntExpr>>(x.t));
+ }
+ void Unparse(const OmpObjectList &x) { Walk(x.v, ","); }
+ void Unparse(const OmpObject &x) {
+ common::visit( //
+ common::visitors{
+ [&](const Designator &y) { Walk(y); },
+ [&](const Name &y) {
+ Put("/");
+ Walk(y);
+ Put("/");
+ },
+ [&](const OmpObject::Invalid &y) {
+ switch (y.v) {
+ case OmpObject::Invalid::Kind::BlankCommonBlock:
+ Put("//");
+ break;
+ }
+ },
+ },
+ x.u);
+ }
+ void Unparse(const OmpOrderClause &x) {
+ using Modifier = OmpOrderClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ":");
+ Walk(std::get<OmpOrderClause::Ordering>(x.t));
+ }
+ void Unparse(const OmpPreferenceSelector &x) {
+ common::visit( //
+ common::visitors{
+ [&](const OmpPreferenceSelector::ForeignRuntimeIdentifier &s) {
+ Word("FR");
+ Put("(");
+ Walk(s);
+ Put(")");
+ },
+ [&](const OmpPreferenceSelector::Extensions &s) {
+ Word("ATTR");
+ Put("(");
+ Walk(s, ", ");
+ Put(")");
+ },
+ },
+ x.u);
+ }
+ void Unparse(const OmpPreferenceSpecification &x) {
+ common::visit( //
+ common::visitors{
+ [&](const std::list<OmpPreferenceSelector> &s) {
+ Put("{");
+ Walk(s, ", ");
+ Put("}");
+ },
+ [&](const OmpPreferenceSelector::ForeignRuntimeIdentifier &s) {
+ Walk(s);
+ },
+ },
+ x.u);
+ }
+ void Unparse(const OmpPreferType &x) {
+ Word("PREFER_TYPE");
+ Put("(");
+ Walk(x.v, ", ");
+ Put(")");
+ }
+ void Unparse(const OmpReductionClause &x) {
+ using Modifier = OmpReductionClause::Modifier;
Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
Walk(std::get<OmpObjectList>(x.t));
}
- void Unparse(const OmpAlignModifier &x) {
- Word("ALIGN(");
- Walk(x.v);
- Put(")");
+ void Unparse(const OmpReductionSpecifier &x) {
+ Walk(std::get<OmpReductionIdentifier>(x.t));
+ Put(":");
+ Walk(std::get<OmpTypeNameList>(x.t));
+ Walk(": ", std::get<std::optional<OmpCombinerExpression>>(x.t));
}
- void Unparse(const OmpAllocatorSimpleModifier &x) { Walk(x.v); }
- void Unparse(const OmpAllocatorComplexModifier &x) {
- Word("ALLOCATOR(");
- Walk(x.v);
- Put(")");
+ void Unparse(const OmpScheduleClause &x) {
+ using Modifier = OmpScheduleClause::Modifier;
+ Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ":");
+ Walk(std::get<OmpScheduleClause::Kind>(x.t));
+ Walk(",", std::get<std::optional<ScalarIntExpr>>(x.t));
}
- void Unparse(const OmpAttachModifier &x) {
- Word("ATTACH(");
+ void Unparse(const OmpStepComplexModifier &x) {
+ Word("STEP(");
Walk(x.v);
Put(")");
}
- void Unparse(const OmpOrderClause &x) {
- using Modifier = OmpOrderClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ":");
- Walk(std::get<OmpOrderClause::Ordering>(x.t));
- }
- void Unparse(const OmpGrainsizeClause &x) {
- using Modifier = OmpGrainsizeClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<ScalarIntExpr>(x.t));
+ void Unparse(const OmpStepSimpleModifier &x) { Walk(x.v); }
+ void Unparse(const OmpStylizedDeclaration &x) {
+ // empty
}
- void Unparse(const OmpNumTasksClause &x) {
- using Modifier = OmpNumTasksClause::Modifier;
- Walk(std::get<std::optional<std::list<Modifier>>>(x.t), ": ");
- Walk(std::get<ScalarIntExpr>(x.t));
+ void Unparse(const OmpStylizedExpression &x...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/173391
More information about the flang-commits
mailing list