[flang-commits] [flang] [flang][OpenMP] Consistent names for non-executable directives, NFC (PR #196803)
via flang-commits
flang-commits at lists.llvm.org
Sun May 10 07:06:25 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-semantics
Author: Krzysztof Parzyszek (kparzysz)
<details>
<summary>Changes</summary>
Change
OpenMPGroupprivate -> OmpGroupprivateDirective
OpenMPThreadprivate -> OmpThreadprivateDirective
OpenMPRequiresConstruct -> OmpRequiresDirective
OpenMPUtilityConstruct -> OmpUtilityDirective
---
Patch is 36.21 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/196803.diff
20 Files Affected:
- (modified) flang/examples/FeatureList/FeatureList.cpp (+2-2)
- (modified) flang/include/flang/Parser/dump-parse-tree.h (+4-4)
- (modified) flang/include/flang/Parser/parse-tree.h (+13-11)
- (modified) flang/lib/Lower/OpenMP/OpenMP.cpp (+6-6)
- (modified) flang/lib/Parser/openmp-parsers.cpp (+10-10)
- (modified) flang/lib/Parser/unparse.cpp (+3-3)
- (modified) flang/lib/Semantics/canonicalize-omp.cpp (+4-4)
- (modified) flang/lib/Semantics/check-omp-structure.cpp (+7-7)
- (modified) flang/lib/Semantics/check-omp-structure.h (+6-6)
- (modified) flang/lib/Semantics/resolve-directives.cpp (+10-10)
- (modified) flang/lib/Semantics/resolve-names.cpp (+5-3)
- (modified) flang/lib/Semantics/rewrite-parse-tree.cpp (+1-1)
- (modified) flang/lib/Semantics/unparse-with-symbols.cpp (+9-4)
- (modified) flang/test/Lower/OpenMP/Todo/error.f90 (+1-1)
- (modified) flang/test/Parser/OpenMP/error-unparse.f90 (+3-3)
- (modified) flang/test/Parser/OpenMP/groupprivate.f90 (+2-2)
- (modified) flang/test/Parser/OpenMP/nothing.f90 (+4-4)
- (modified) flang/test/Parser/OpenMP/requires.f90 (+5-5)
- (modified) flang/test/Parser/OpenMP/threadprivate.f90 (+1-1)
- (modified) flang/test/Semantics/OpenMP/simd-only.f90 (+1-1)
``````````diff
diff --git a/flang/examples/FeatureList/FeatureList.cpp b/flang/examples/FeatureList/FeatureList.cpp
index 80683f90654a2..c0f6a1776c2e5 100644
--- a/flang/examples/FeatureList/FeatureList.cpp
+++ b/flang/examples/FeatureList/FeatureList.cpp
@@ -556,12 +556,12 @@ struct NodeVisitor {
READ_FEATURE(OpenMPFlushConstruct)
READ_FEATURE(OpenMPLoopConstruct)
READ_FEATURE(OpenMPAllocatorsConstruct)
- READ_FEATURE(OpenMPRequiresConstruct)
+ READ_FEATURE(OmpRequiresDirective)
READ_FEATURE(OpenMPSimpleStandaloneConstruct)
READ_FEATURE(OpenMPStandaloneConstruct)
READ_FEATURE(OpenMPSectionConstruct)
READ_FEATURE(OpenMPSectionsConstruct)
- READ_FEATURE(OpenMPThreadprivate)
+ READ_FEATURE(OmpThreadprivateDirective)
READ_FEATURE(OpenStmt)
READ_FEATURE(Optional)
READ_FEATURE(OptionalStmt)
diff --git a/flang/include/flang/Parser/dump-parse-tree.h b/flang/include/flang/Parser/dump-parse-tree.h
index da5a00b68ad38..1825db3a3424b 100644
--- a/flang/include/flang/Parser/dump-parse-tree.h
+++ b/flang/include/flang/Parser/dump-parse-tree.h
@@ -630,6 +630,7 @@ class ParseTreeDumper {
NODE(OmpGrainsizeClause, Modifier)
NODE(parser, OmpGraphIdClause)
NODE(parser, OmpGraphResetClause)
+ NODE(parser, OmpGroupprivateDirective)
NODE(parser, OmpHintClause)
NODE(parser, OmpHoldsClause)
NODE(parser, OmpIfClause)
@@ -711,6 +712,7 @@ class ParseTreeDumper {
NODE(parser, OmpRefModifier)
NODE_ENUM(OmpRefModifier, Value)
NODE(parser, OmpReplayableClause)
+ NODE(parser, OmpRequiresDirective)
NODE(parser, OmpReverseOffloadClause)
NODE(parser, OmpScheduleClause)
NODE(OmpScheduleClause, Modifier)
@@ -731,6 +733,7 @@ class ParseTreeDumper {
NODE(OmpTaskReductionClause, Modifier)
NODE(parser, OmpThreadLimitClause)
NODE(OmpThreadLimitClause, Modifier)
+ NODE(parser, OmpThreadprivateDirective)
NODE(parser, OmpThreadsetClause)
NODE_ENUM(OmpThreadsetClause, ThreadsetPolicy)
NODE(parser, OmpToClause)
@@ -754,6 +757,7 @@ class ParseTreeDumper {
NODE(parser, OmpUnifiedSharedMemoryClause)
NODE(parser, OmpUpdateClause)
NODE(parser, OmpUseClause)
+ NODE(parser, OmpUtilityDirective)
NODE(parser, OmpVariableCategory)
NODE_ENUM(OmpVariableCategory, Value)
NODE(parser, OmpWhenClause)
@@ -790,17 +794,13 @@ class ParseTreeDumper {
NODE(parser, OpenMPDepobjConstruct)
NODE(parser, OpenMPDispatchConstruct)
NODE(parser, OpenMPFlushConstruct)
- NODE(parser, OpenMPGroupprivate)
NODE(parser, OpenMPInvalidDirective)
NODE(parser, OpenMPLoopConstruct)
NODE(parser, OpenMPMisplacedEndDirective)
- NODE(parser, OpenMPRequiresConstruct)
NODE(parser, OpenMPSectionConstruct)
NODE(parser, OpenMPSectionsConstruct)
NODE(parser, OpenMPSimpleStandaloneConstruct)
NODE(parser, OpenMPStandaloneConstruct)
- NODE(parser, OpenMPThreadprivate)
- NODE(parser, OpenMPUtilityConstruct)
NODE(parser, OpenStmt)
NODE(parser, Optional)
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index 628f2ed80abad..58aeaf2280c53 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -5153,8 +5153,8 @@ struct OmpErrorDirective {
WRAPPER_CLASS_BOILERPLATE(OmpErrorDirective, OmpDirectiveSpecification);
};
-struct OpenMPUtilityConstruct {
- UNION_CLASS_BOILERPLATE(OpenMPUtilityConstruct);
+struct OmpUtilityDirective {
+ UNION_CLASS_BOILERPLATE(OmpUtilityDirective);
CharBlock source;
std::variant<OmpErrorDirective, OmpNothingDirective> u;
};
@@ -5271,20 +5271,22 @@ struct OmpDeclareSimdDirective {
//
// groupprivate-directive ->
// GROUPPRIVATE (variable-list-item...) // since 6.0
-struct OpenMPGroupprivate {
- WRAPPER_CLASS_BOILERPLATE(OpenMPGroupprivate, OmpDirectiveSpecification);
+struct OmpGroupprivateDirective {
+ WRAPPER_CLASS_BOILERPLATE(
+ OmpGroupprivateDirective, OmpDirectiveSpecification);
CharBlock source;
};
// 2.4 requires -> REQUIRES requires-clause[ [ [,] requires-clause]...]
-struct OpenMPRequiresConstruct {
- WRAPPER_CLASS_BOILERPLATE(OpenMPRequiresConstruct, OmpDirectiveSpecification);
+struct OmpRequiresDirective {
+ WRAPPER_CLASS_BOILERPLATE(OmpRequiresDirective, OmpDirectiveSpecification);
CharBlock source;
};
// 2.15.2 threadprivate -> THREADPRIVATE (variable-name-list)
-struct OpenMPThreadprivate {
- WRAPPER_CLASS_BOILERPLATE(OpenMPThreadprivate, OmpDirectiveSpecification);
+struct OmpThreadprivateDirective {
+ WRAPPER_CLASS_BOILERPLATE(
+ OmpThreadprivateDirective, OmpDirectiveSpecification);
CharBlock source;
};
@@ -5326,8 +5328,8 @@ struct OpenMPDeclarativeConstruct {
std::variant<OmpAllocateDirective, OpenMPDeclarativeAssumes,
OmpDeclareMapperDirective, OmpDeclareReductionDirective,
OmpDeclareSimdDirective, OmpDeclareTargetDirective,
- OmpDeclareVariantDirective, OpenMPGroupprivate, OpenMPThreadprivate,
- OpenMPRequiresConstruct, OpenMPUtilityConstruct,
+ OmpDeclareVariantDirective, OmpGroupprivateDirective,
+ OmpThreadprivateDirective, OmpRequiresDirective, OmpUtilityDirective,
OmpMetadirectiveDirective>
u;
};
@@ -5473,7 +5475,7 @@ struct OpenMPConstruct {
std::variant<OpenMPStandaloneConstruct, OpenMPSectionsConstruct,
OpenMPSectionConstruct, OpenMPLoopConstruct, OmpBlockConstruct,
OpenMPAtomicConstruct, OmpAllocateDirective, OpenMPDispatchConstruct,
- OpenMPUtilityConstruct, OpenMPAllocatorsConstruct, OpenMPAssumeConstruct,
+ OmpUtilityDirective, OpenMPAllocatorsConstruct, OpenMPAssumeConstruct,
OpenMPCriticalConstruct, OmpDelimitedMetadirectiveDirective>
u;
};
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 0ffc7bdae85b9..fb5014f3394be 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -3926,7 +3926,7 @@ static void genOMPDispatch(lower::AbstractConverter &converter,
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
- const parser::OpenMPUtilityConstruct &);
+ const parser::OmpUtilityDirective &);
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
@@ -4409,14 +4409,14 @@ genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
- const parser::OpenMPGroupprivate &directive) {
+ const parser::OmpGroupprivateDirective &directive) {
TODO(converter.getCurrentLocation(), "GROUPPRIVATE");
}
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
- const parser::OpenMPRequiresConstruct &requiresConstruct) {
+ const parser::OmpRequiresDirective &requiresConstruct) {
// Requires directives are gathered and processed in semantics and
// then combined in the lowering bridge before triggering codegen
// just once. Hence, there is no need to lower each individual
@@ -4426,7 +4426,7 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
- const parser::OpenMPThreadprivate &threadprivate) {
+ const parser::OmpThreadprivateDirective &threadprivate) {
// The directive is lowered when instantiating the variable to
// support the case of threadprivate variable declared in module.
}
@@ -4692,9 +4692,9 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
- const parser::OpenMPUtilityConstruct &) {
+ const parser::OmpUtilityDirective &) {
if (!semaCtx.langOptions().OpenMPSimd)
- TODO(converter.getCurrentLocation(), "OpenMPUtilityConstruct");
+ TODO(converter.getCurrentLocation(), "OmpUtilityDirective");
}
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index d89bf13e137d8..e9bd97d729b89 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -1916,8 +1916,8 @@ TYPE_PARSER(construct<OmpNothingDirective>(
OmpDirectiveSpecificationParser{}))
TYPE_PARSER( //
- sourced(construct<OpenMPUtilityConstruct>(Parser<OmpErrorDirective>{})) ||
- sourced(construct<OpenMPUtilityConstruct>(Parser<OmpNothingDirective>{})))
+ sourced(construct<OmpUtilityDirective>(Parser<OmpErrorDirective>{})) ||
+ sourced(construct<OmpUtilityDirective>(Parser<OmpNothingDirective>{})))
TYPE_PARSER(construct<OmpMetadirectiveDirective>(
predicated(Parser<OmpDirectiveName>{},
@@ -2423,20 +2423,20 @@ TYPE_PARSER(sourced(construct<OmpDeclareSimdDirective>(
OmpDirectiveSpecificationParser{})))
TYPE_PARSER(sourced( //
- construct<OpenMPGroupprivate>(
+ construct<OmpGroupprivateDirective>(
predicated(OmpDirectiveNameParser{},
IsDirective(llvm::omp::Directive::OMPD_groupprivate)) >=
OmpDirectiveSpecificationParser{})))
// 2.4 Requires construct
-TYPE_PARSER(sourced(construct<OpenMPRequiresConstruct>(
+TYPE_PARSER(sourced(construct<OmpRequiresDirective>(
predicated(OmpDirectiveNameParser{},
IsDirective(llvm::omp::Directive::OMPD_requires)) >=
OmpDirectiveSpecificationParser{})))
// 2.15.2 Threadprivate directive
TYPE_PARSER(sourced( //
- construct<OpenMPThreadprivate>(
+ construct<OmpThreadprivateDirective>(
predicated(OmpDirectiveNameParser{},
IsDirective(llvm::omp::Directive::OMPD_threadprivate)) >=
OmpDirectiveSpecificationParser{})))
@@ -2465,13 +2465,13 @@ TYPE_PARSER(
construct<OpenMPDeclarativeConstruct>(
sourced(OmpDeclarativeAllocateParser{})) ||
construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPGroupprivate>{}) ||
+ Parser<OmpGroupprivateDirective>{}) ||
construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPRequiresConstruct>{}) ||
+ Parser<OmpRequiresDirective>{}) ||
construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPThreadprivate>{}) ||
+ Parser<OmpThreadprivateDirective>{}) ||
construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPUtilityConstruct>{}) ||
+ Parser<OmpUtilityDirective>{}) ||
construct<OpenMPDeclarativeConstruct>(
Parser<OmpMetadirectiveDirective>{})) /
endOmpLine))
@@ -2566,7 +2566,7 @@ TYPE_CONTEXT_PARSER("OpenMP construct"_en_US,
// OpenMPStandaloneConstruct to resolve !$OMP ORDERED
construct<OpenMPConstruct>(Parser<OpenMPStandaloneConstruct>{}),
construct<OpenMPConstruct>(Parser<OpenMPAtomicConstruct>{}),
- construct<OpenMPConstruct>(Parser<OpenMPUtilityConstruct>{}),
+ construct<OpenMPConstruct>(Parser<OmpUtilityDirective>{}),
construct<OpenMPConstruct>(Parser<OpenMPDispatchConstruct>{}),
construct<OpenMPConstruct>(Parser<OpenMPAllocatorsConstruct>{}),
construct<OpenMPConstruct>(Parser<OpenMPAssumeConstruct>{}),
diff --git a/flang/lib/Parser/unparse.cpp b/flang/lib/Parser/unparse.cpp
index 8a01f410bd861..355eadaf8e0d4 100644
--- a/flang/lib/Parser/unparse.cpp
+++ b/flang/lib/Parser/unparse.cpp
@@ -2718,7 +2718,7 @@ class UnparseVisitor {
Put("\n");
EndOpenMP();
}
- void Unparse(const OpenMPGroupprivate &x) {
+ void Unparse(const OmpGroupprivateDirective &x) {
BeginOpenMP();
Word("!$OMP ");
Walk(x.v);
@@ -2742,7 +2742,7 @@ class UnparseVisitor {
void Unparse(const OpenMPMisplacedEndDirective &x) {
Unparse(static_cast<const OmpEndDirective &>(x));
}
- void Unparse(const OpenMPRequiresConstruct &x) {
+ void Unparse(const OmpRequiresDirective &x) {
BeginOpenMP();
Word("!$OMP ");
Walk(x.v);
@@ -2772,7 +2772,7 @@ class UnparseVisitor {
Put("\n");
EndOpenMP();
}
- void Unparse(const OpenMPThreadprivate &x) {
+ void Unparse(const OmpThreadprivateDirective &x) {
BeginOpenMP();
Word("!$OMP ");
Walk(x.v);
diff --git a/flang/lib/Semantics/canonicalize-omp.cpp b/flang/lib/Semantics/canonicalize-omp.cpp
index f67ac689add14..bcef673dcdb0b 100644
--- a/flang/lib/Semantics/canonicalize-omp.cpp
+++ b/flang/lib/Semantics/canonicalize-omp.cpp
@@ -278,7 +278,7 @@ class CanonicalizationOfOmp {
// Got OpenMPDeclarativeConstruct. If it's not a utility construct
// then stop.
auto &odc = std::get<OpenMPDeclarativeConstruct>(sc.u).value();
- if (!std::holds_alternative<parser::OpenMPUtilityConstruct>(odc.u)) {
+ if (!std::holds_alternative<parser::OmpUtilityDirective>(odc.u)) {
return rit;
}
}
@@ -291,7 +291,7 @@ class CanonicalizationOfOmp {
using OpenMPDeclarativeConstruct =
common::Indirection<parser::OpenMPDeclarativeConstruct>;
auto &oc = std::get<OpenMPDeclarativeConstruct>(sc.u).value();
- auto &ut = std::get<parser::OpenMPUtilityConstruct>(oc.u);
+ auto &ut = std::get<parser::OmpUtilityDirective>(oc.u);
return parser::ExecutionPartConstruct(parser::ExecutableConstruct(
common::Indirection(parser::OpenMPConstruct(std::move(ut)))));
@@ -309,7 +309,7 @@ class CanonicalizationOfOmp {
std::list<OpenMPDeclarativeConstruct>::reverse_iterator rlast = [&]() {
for (auto rit = omps.rbegin(), rend = omps.rend(); rit != rend; ++rit) {
OpenMPDeclarativeConstruct &dc = *rit;
- if (!std::holds_alternative<parser::OpenMPUtilityConstruct>(dc.u)) {
+ if (!std::holds_alternative<parser::OmpUtilityDirective>(dc.u)) {
return rit;
}
}
@@ -318,7 +318,7 @@ class CanonicalizationOfOmp {
std::transform(omps.rbegin(), rlast, std::front_inserter(block),
[](parser::OpenMPDeclarativeConstruct &dc) {
- auto &ut = std::get<parser::OpenMPUtilityConstruct>(dc.u);
+ auto &ut = std::get<parser::OmpUtilityDirective>(dc.u);
return parser::ExecutionPartConstruct(parser::ExecutableConstruct(
common::Indirection(parser::OpenMPConstruct(std::move(ut)))));
});
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index e3b623e2e9f95..022003a8e1728 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -891,7 +891,7 @@ template <typename Checker> struct DirectiveSpellingVisitor {
checker_(GetDirName(x.t).source, Directive::OMPD_allocators);
return false;
}
- bool Pre(const parser::OpenMPGroupprivate &x) {
+ bool Pre(const parser::OmpGroupprivateDirective &x) {
checker_(x.v.DirName().source, Directive::OMPD_groupprivate);
return false;
}
@@ -1574,7 +1574,7 @@ void OmpStructureChecker::CheckThreadprivateOrDeclareTargetVar(
}
}
-void OmpStructureChecker::Enter(const parser::OpenMPGroupprivate &x) {
+void OmpStructureChecker::Enter(const parser::OmpGroupprivateDirective &x) {
PushContextAndClauseSets(
x.v.DirName().source, llvm::omp::Directive::OMPD_groupprivate);
@@ -1626,16 +1626,16 @@ void OmpStructureChecker::Enter(const parser::OpenMPGroupprivate &x) {
}
}
-void OmpStructureChecker::Leave(const parser::OpenMPGroupprivate &x) {
+void OmpStructureChecker::Leave(const parser::OmpGroupprivateDirective &x) {
dirContext_.pop_back();
}
-void OmpStructureChecker::Enter(const parser::OpenMPThreadprivate &x) {
+void OmpStructureChecker::Enter(const parser::OmpThreadprivateDirective &x) {
const parser::OmpDirectiveName &dirName{x.v.DirName()};
PushContextAndClauseSets(dirName.source, dirName.v);
}
-void OmpStructureChecker::Leave(const parser::OpenMPThreadprivate &x) {
+void OmpStructureChecker::Leave(const parser::OmpThreadprivateDirective &x) {
const parser::OmpDirectiveSpecification &dirSpec{x.v};
for (const parser::OmpArgument &arg : x.v.Arguments().v) {
if (auto *object{GetArgumentObject(arg)}) {
@@ -1881,7 +1881,7 @@ void OmpStructureChecker::Leave(const parser::OpenMPDepobjConstruct &x) {
dirContext_.pop_back();
}
-void OmpStructureChecker::Enter(const parser::OpenMPRequiresConstruct &x) {
+void OmpStructureChecker::Enter(const parser::OmpRequiresDirective &x) {
const auto &dirName{x.v.DirName()};
PushContextAndClauseSets(dirName.source, dirName.v);
unsigned version{context_.langOptions().OpenMPVersion};
@@ -1924,7 +1924,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPRequiresConstruct &x) {
}
}
-void OmpStructureChecker::Leave(const parser::OpenMPRequiresConstruct &) {
+void OmpStructureChecker::Leave(const parser::OmpRequiresDirective &) {
dirContext_.pop_back();
}
diff --git a/flang/lib/Semantics/check-omp-structure.h b/flang/lib/Semantics/check-omp-structure.h
index 397381e30cccd..f9852bbf77d65 100644
--- a/flang/lib/Semantics/check-omp-structure.h
+++ b/flang/lib/Semantics/check-omp-structure.h
@@ -145,12 +145,12 @@ class OmpStructureChecker : public OmpStructureCheckerBase {
void Leave(const parser::OmpNothingDirective &);
void Enter(const parser::OpenMPAllocatorsConstruct &);
void Leave(const parser::OpenMPAllocatorsConstruct &);
- void Enter(const parser::OpenMPRequiresConstruct &);
- void Leave(const parser::OpenMPRequiresConstruct &);
- void Enter(const parser::OpenMPGroupprivate &);
- void Leave(const parser::OpenMPGroupprivate &);
- void Enter(const parser::OpenMPThreadprivate &);
- void Leave(const parser::OpenMPThreadprivate &);
+ void Enter(const parser::OmpRequiresDirective &);
+ void Leave(const parser::OmpRequiresDirective &);
+ void Enter(const parser::OmpGroupprivateDirective &);
+ void Leave(const parser::OmpGroupprivateDirective &);
+ void Enter(const parser::OmpThreadprivateDirective &);
+ void Leave(const parser::OmpThreadprivateDirective &);
void Enter(const parser::OpenMPSimpleStandaloneConstruct &);
void Leave(const parser::OpenMPSimpleStandaloneConstruct &);
diff --git a/flang/lib/Semantics/resolve-directives.cpp b/flang/lib/Semantics/resolve-directives.cpp
index 52cd445027d37..7ae867e19f276 100644
--- a/flang/lib/Semantics/resolve-directives.cpp
+++ b/flang/lib/Semantics/resolve-directives.cpp
@@ -551,8 +551,8 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
GetContext().withinConstruct = true;
}
- bool Pre(const parser::OpenMPGroupprivate &);
- void Post(const parser::OpenMPGroupprivate &) { PopContext(); }
+ bool Pre(const parser::OmpGroupprivateDirective &);
+ void Post(const parser::OmpGroupprivateDirective &) { PopContext(); }
bool Pre(const parser::OpenMPStandaloneConstruct &x) {
common::visit(
@@ -636,7 +636,7 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
}
void Post(const parser::OpenMPFlushConstruct &) { PopContext(); }
- bool Pre(const parser::OpenMPRequiresConstruct &x) {
+ bool Pre(const parser::OmpRequiresDirective &x) {
using RequiresClauses = WithOmpDeclarative::RequiresClauses;
PushContext(x.source, llvm::omp::Directive::OMPD_requires);
@@ -689,7 +689,7 @@ class OmpAttributeVisitor : DirectiveAttribute...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/196803
More information about the flang-commits
mailing list