Skip to content

Commit d8e85e0

Browse files
Fixes for rebase
1 parent b5bd257 commit d8e85e0

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4612,11 +4612,10 @@ struct OpenMPDeclarativeAllocate {
46124612
struct OpenMPDeclarativeConstruct {
46134613
UNION_CLASS_BOILERPLATE(OpenMPDeclarativeConstruct);
46144614
CharBlock source;
4615-
std::variant<OpenMPDeclarativeAllocate, OpenMPAssumeConstruct, OpenMPDeclarativeAssumes,
4616-
OpenMPDeclareMapperConstruct,
4617-
OpenMPDeclareReductionConstruct, OpenMPDeclareSimdConstruct,
4618-
OpenMPDeclareTargetConstruct, OpenMPThreadprivate,
4619-
OpenMPRequiresConstruct, OpenMPUtilityConstruct>
4615+
std::variant<OpenMPDeclarativeAllocate, OpenMPDeclarativeAssumes,
4616+
OpenMPDeclareMapperConstruct, OpenMPDeclareReductionConstruct,
4617+
OpenMPDeclareSimdConstruct, OpenMPDeclareTargetConstruct,
4618+
OpenMPThreadprivate, OpenMPRequiresConstruct, OpenMPUtilityConstruct>
46204619
u;
46214620
};
46224621

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ extractOmpDirective(const parser::OpenMPConstruct &ompConstruct) {
367367
[](const parser::OpenMPAllocatorsConstruct &c) {
368368
return llvm::omp::OMPD_allocators;
369369
},
370+
[](const parser::OpenMPAssumeConstruct &c) {
371+
return llvm::omp::OMPD_assume;
372+
},
370373
[](const parser::OpenMPAtomicConstruct &c) {
371374
return llvm::omp::OMPD_atomic;
372375
},

flang/lib/Parser/unparse.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,9 +2115,6 @@ class UnparseVisitor {
21152115
},
21162116
x.u);
21172117
}
2118-
void Unparse(const llvm::omp::Directive &x) {
2119-
Word(llvm::omp::getOpenMPDirectiveName(x));
2120-
}
21212118
void Unparse(const OmpDirectiveNameModifier &x) {
21222119
Word(llvm::omp::getOpenMPDirectiveName(x.v));
21232120
}
@@ -2704,19 +2701,13 @@ class UnparseVisitor {
27042701
Walk(std::get<std::optional<OmpReductionInitializerClause>>(x.t));
27052702
EndOpenMP();
27062703
}
2707-
bool Pre(const OpenMPAssumesConstruct &x) {
2704+
void Unparse(const OpenMPDeclarativeAssumes &x) {
27082705
BeginOpenMP();
27092706
Word("!$OMP ASSUMES ");
27102707
Walk(std::get<OmpClauseList>(x.t));
27112708
Put("\n");
27122709
EndOpenMP();
27132710
}
2714-
bool Pre(const OpenMPDeclarativeAssumes &x) {
2715-
Word("!$OMP ASSUMES ");
2716-
Walk(std::get<OmpClauseList>(x.t));
2717-
Put("\n");
2718-
EndOpenMP();
2719-
}
27202711
void Unparse(const OpenMPDeclareMapperConstruct &z) {
27212712
BeginOpenMP();
27222713
Word("!$OMP DECLARE MAPPER (");

0 commit comments

Comments
 (0)