Skip to content

Commit 90f45a1

Browse files
authored
[flang][OpenMP] Implement OmpDirectiveName, use in OmpDirectiveSpecif… (#130121)
…ication The `OmpDirectiveName` class has a source in addition to wrapping the llvm::omp::Directive.
1 parent 308f933 commit 90f45a1

File tree

13 files changed

+126
-50
lines changed

13 files changed

+126
-50
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ class ParseTreeDumper {
489489
NODE(parser, OmpOtherwiseClause)
490490
NODE(parser, OmpWhenClause)
491491
NODE(OmpWhenClause, Modifier)
492+
NODE(parser, OmpDirectiveName)
492493
NODE(parser, OmpDirectiveSpecification)
493494
NODE(parser, OmpTraitPropertyName)
494495
NODE(parser, OmpTraitScore)
@@ -586,7 +587,6 @@ class ParseTreeDumper {
586587
NODE(OmpFromClause, Modifier)
587588
NODE(parser, OmpExpectation)
588589
NODE_ENUM(OmpExpectation, Value)
589-
NODE(parser, OmpDirectiveNameModifier)
590590
NODE(parser, OmpHoldsClause)
591591
NODE(parser, OmpIfClause)
592592
NODE(OmpIfClause, Modifier)

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

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3464,6 +3464,19 @@ WRAPPER_CLASS(PauseStmt, std::optional<StopCode>);
34643464
struct OmpClause;
34653465
struct OmpDirectiveSpecification;
34663466

3467+
struct OmpDirectiveName {
3468+
// No boilerplates: this class should be copyable, movable, etc.
3469+
constexpr OmpDirectiveName() = default;
3470+
constexpr OmpDirectiveName(const OmpDirectiveName &) = default;
3471+
// Construct from an already parsed text. Use Verbatim for this because
3472+
// Verbatim's source corresponds to an actual source location.
3473+
// This allows "construct<OmpDirectiveName>(Verbatim("<name>"))".
3474+
OmpDirectiveName(const Verbatim &name);
3475+
using WrapperTrait = std::true_type;
3476+
CharBlock source;
3477+
llvm::omp::Directive v{llvm::omp::Directive::OMPD_unknown};
3478+
};
3479+
34673480
// 2.1 Directives or clauses may accept a list or extended-list.
34683481
// A list item is a variable, array section or common block name (enclosed
34693482
// in slashes). An extended list item is a list item or a procedure Name.
@@ -3794,9 +3807,7 @@ struct OmpDeviceModifier {
37943807
// [*] The IF clause is allowed on CANCEL in OpenMP 4.5, but only without
37953808
// the directive-name-modifier. For the sake of uniformity CANCEL can be
37963809
// considered a valid value in 4.5 as well.
3797-
struct OmpDirectiveNameModifier {
3798-
WRAPPER_CLASS_BOILERPLATE(OmpDirectiveNameModifier, llvm::omp::Directive);
3799-
};
3810+
using OmpDirectiveNameModifier = OmpDirectiveName;
38003811

38013812
// Ref: [5.1:205-209], [5.2:166-168]
38023813
//
@@ -4493,7 +4504,12 @@ struct OmpClauseList {
44934504
struct OmpDirectiveSpecification {
44944505
CharBlock source;
44954506
TUPLE_CLASS_BOILERPLATE(OmpDirectiveSpecification);
4496-
std::tuple<llvm::omp::Directive, std::optional<std::list<OmpArgument>>,
4507+
llvm::omp::Directive DirId() const { //
4508+
return std::get<OmpDirectiveName>(t).v;
4509+
}
4510+
const OmpClauseList &Clauses() const;
4511+
4512+
std::tuple<OmpDirectiveName, std::optional<std::list<OmpArgument>>,
44974513
std::optional<OmpClauseList>>
44984514
t;
44994515
};

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,40 @@ namespace Fortran::parser {
2727
constexpr auto startOmpLine = skipStuffBeforeStatement >> "!$OMP "_sptok;
2828
constexpr auto endOmpLine = space >> endOfLine;
2929

30+
// Given a parser P for a wrapper class, invoke P, and if it succeeds return
31+
// the wrapped object.
32+
template <typename Parser> struct UnwrapParser {
33+
static_assert(
34+
Parser::resultType::WrapperTrait::value && "Wrapper class required");
35+
using resultType = decltype(Parser::resultType::v);
36+
constexpr UnwrapParser(Parser p) : parser_(p) {}
37+
38+
std::optional<resultType> Parse(ParseState &state) const {
39+
if (auto result{parser_.Parse(state)}) {
40+
return result->v;
41+
}
42+
return std::nullopt;
43+
}
44+
45+
private:
46+
const Parser parser_;
47+
};
48+
49+
template <typename Parser> constexpr auto unwrap(const Parser &p) {
50+
return UnwrapParser<Parser>(p);
51+
}
52+
3053
/// Parse OpenMP directive name (this includes compound directives).
3154
struct OmpDirectiveNameParser {
32-
using resultType = llvm::omp::Directive;
55+
using resultType = OmpDirectiveName;
3356
using Token = TokenStringMatch<false, false>;
3457

3558
std::optional<resultType> Parse(ParseState &state) const {
3659
for (const NameWithId &nid : directives()) {
3760
if (attempt(Token(nid.first.data())).Parse(state)) {
38-
return nid.second;
61+
OmpDirectiveName n;
62+
n.v = nid.second;
63+
return n;
3964
}
4065
}
4166
return std::nullopt;
@@ -218,7 +243,7 @@ TYPE_PARSER(construct<OmpTraitSelectorName::Value>(
218243
TYPE_PARSER(sourced(construct<OmpTraitSelectorName>(
219244
// Parse predefined names first (because of SIMD).
220245
construct<OmpTraitSelectorName>(Parser<OmpTraitSelectorName::Value>{}) ||
221-
construct<OmpTraitSelectorName>(OmpDirectiveNameParser{}) ||
246+
construct<OmpTraitSelectorName>(unwrap(OmpDirectiveNameParser{})) ||
222247
// identifier-or-string for extensions
223248
construct<OmpTraitSelectorName>(
224249
applyFunction(nameToString, Parser<Name>{})) ||
@@ -775,9 +800,9 @@ TYPE_PARSER(construct<OmpMessageClause>(expr))
775800

776801
TYPE_PARSER(construct<OmpHoldsClause>(indirect(expr)))
777802
TYPE_PARSER(construct<OmpAbsentClause>(many(maybe(","_tok) >>
778-
construct<llvm::omp::Directive>(OmpDirectiveNameParser{}))))
803+
construct<llvm::omp::Directive>(unwrap(OmpDirectiveNameParser{})))))
779804
TYPE_PARSER(construct<OmpContainsClause>(many(maybe(","_tok) >>
780-
construct<llvm::omp::Directive>(OmpDirectiveNameParser{}))))
805+
construct<llvm::omp::Directive>(unwrap(OmpDirectiveNameParser{})))))
781806

782807
TYPE_PARSER("ABSENT" >> construct<OmpClause>(construct<OmpClause::Absent>(
783808
parenthesized(Parser<OmpAbsentClause>{}))) ||
@@ -972,7 +997,7 @@ TYPE_PARSER(sourced(construct<OmpErrorDirective>(
972997
// --- Parsers for directives and constructs --------------------------
973998

974999
TYPE_PARSER(sourced(construct<OmpDirectiveSpecification>( //
975-
OmpDirectiveNameParser{},
1000+
sourced(OmpDirectiveNameParser{}),
9761001
maybe(parenthesized(nonemptyList(Parser<OmpArgument>{}))),
9771002
maybe(Parser<OmpClauseList>{}))))
9781003

flang/lib/Parser/parse-tree.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,23 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const Name &x) {
253253
return os << x.ToString();
254254
}
255255

256+
OmpDirectiveName::OmpDirectiveName(const Verbatim &name) {
257+
std::string_view nameView{name.source.begin(), name.source.size()};
258+
std::string nameLower{ToLowerCaseLetters(nameView)};
259+
// The function getOpenMPDirectiveKind will return OMPD_unknown in two cases:
260+
// (1) if the given string doesn't match any actual directive, or
261+
// (2) if the given string was "unknown".
262+
// The Verbatim(<token>) parser will succeed as long as the given token
263+
// matches the source.
264+
// Since using "construct<OmpDirectiveName>(verbatim(...))" will succeed
265+
// if the verbatim parser succeeds, in order to get OMPD_unknown the
266+
// token given to Verbatim must be invalid. Because it's an internal issue
267+
// asserting is ok.
268+
v = llvm::omp::getOpenMPDirectiveKind(nameLower);
269+
assert(v != llvm::omp::Directive::OMPD_unknown && "Invalid directive name");
270+
source = name.source;
271+
}
272+
256273
OmpDependenceType::Value OmpDoacross::GetDepType() const {
257274
return common::visit( //
258275
common::visitors{
@@ -319,4 +336,12 @@ namespace Fortran::parser {
319336
llvm::omp::Clause OmpClause::Id() const {
320337
return std::visit([](auto &&s) { return getClauseIdForClass(s); }, u);
321338
}
339+
340+
const OmpClauseList &OmpDirectiveSpecification::Clauses() const {
341+
static OmpClauseList empty{std::move(decltype(OmpClauseList::v){})};
342+
if (auto &clauses = std::get<std::optional<OmpClauseList>>(t)) {
343+
return *clauses;
344+
}
345+
return empty;
346+
}
322347
} // namespace Fortran::parser

flang/lib/Parser/unparse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ class UnparseVisitor {
20952095
}
20962096
void Unparse(const OmpDirectiveSpecification &x) {
20972097
using ArgList = std::list<parser::OmpArgument>;
2098-
Walk(std::get<llvm::omp::Directive>(x.t));
2098+
Walk(std::get<OmpDirectiveName>(x.t));
20992099
if (auto &args{std::get<std::optional<ArgList>>(x.t)}) {
21002100
Put("(");
21012101
Walk(*args);

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,18 +625,28 @@ void OmpStructureChecker::CheckHintClause(
625625
}
626626

627627
void OmpStructureChecker::Enter(const parser::OmpDirectiveSpecification &x) {
628-
PushContextAndClauseSets(x.source, std::get<llvm::omp::Directive>(x.t));
628+
// OmpDirectiveSpecification exists on its own only in METADIRECTIVE.
629+
// In other cases it's a part of other constructs that handle directive
630+
// context stack by themselves.
631+
if (GetDirectiveNest(MetadirectiveNest)) {
632+
PushContextAndClauseSets(
633+
std::get<parser::OmpDirectiveName>(x.t).source, x.DirId());
634+
}
629635
}
630636

631637
void OmpStructureChecker::Leave(const parser::OmpDirectiveSpecification &) {
632-
dirContext_.pop_back();
638+
if (GetDirectiveNest(MetadirectiveNest)) {
639+
dirContext_.pop_back();
640+
}
633641
}
634642

635643
void OmpStructureChecker::Enter(const parser::OmpMetadirectiveDirective &x) {
644+
EnterDirectiveNest(MetadirectiveNest);
636645
PushContextAndClauseSets(x.source, llvm::omp::Directive::OMPD_metadirective);
637646
}
638647

639648
void OmpStructureChecker::Leave(const parser::OmpMetadirectiveDirective &) {
649+
ExitDirectiveNest(MetadirectiveNest);
640650
dirContext_.pop_back();
641651
}
642652

flang/lib/Semantics/check-omp-structure.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ class OmpStructureChecker
326326
TargetNest,
327327
DeclarativeNest,
328328
ContextSelectorNest,
329-
LastType = ContextSelectorNest,
329+
MetadirectiveNest,
330+
LastType = MetadirectiveNest,
330331
};
331332
int directiveNest_[LastType + 1] = {0};
332333

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
352352
}
353353

354354
bool Pre(const parser::OmpDirectiveSpecification &x) {
355-
PushContext(x.source, std::get<llvm::omp::Directive>(x.t));
355+
PushContext(x.source, x.DirId());
356356
return true;
357357
}
358358
void Post(const parser::OmpDirectiveSpecification &) { PopContext(); }

flang/lib/Semantics/resolve-names.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,11 +1775,10 @@ bool OmpVisitor::Pre(const parser::OmpDirectiveSpecification &x) {
17751775
// Disable the semantic analysis for it for now to allow the compiler to
17761776
// parse METADIRECTIVE without flagging errors.
17771777
AddOmpSourceRange(x.source);
1778-
auto dirId{std::get<llvm::omp::Directive>(x.t)};
17791778
auto &maybeArgs{std::get<std::optional<std::list<parser::OmpArgument>>>(x.t)};
17801779
auto &maybeClauses{std::get<std::optional<parser::OmpClauseList>>(x.t)};
17811780

1782-
switch (dirId) {
1781+
switch (x.DirId()) {
17831782
case llvm::omp::Directive::OMPD_declare_mapper:
17841783
if (maybeArgs && maybeClauses) {
17851784
const parser::OmpArgument &first{maybeArgs->front()};

flang/test/Parser/OpenMP/if-clause.f90

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@ program openmp_parse_if
1111

1212
! CHECK: OmpSimpleStandaloneDirective -> llvm::omp::Directive = target update
1313
! CHECK-NEXT: OmpClause -> If -> OmpIfClause
14-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = target update
14+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = target update
1515
!$omp target update if(target update: cond) to(i)
1616

1717
! CHECK: OmpSimpleStandaloneDirective -> llvm::omp::Directive = target enter data
1818
! CHECK: OmpClause -> If -> OmpIfClause
19-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = target enter data
19+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = target enter data
2020
!$omp target enter data map(to: i) if(target enter data: cond)
2121

2222
! CHECK: OmpSimpleStandaloneDirective -> llvm::omp::Directive = target exit data
2323
! CHECK: OmpClause -> If -> OmpIfClause
24-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = target exit data
24+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = target exit data
2525
!$omp target exit data map(from: i) if(target exit data: cond)
2626

2727
! CHECK: OmpBlockDirective -> llvm::omp::Directive = target data
2828
! CHECK: OmpClause -> If -> OmpIfClause
29-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = target data
29+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = target data
3030
!$omp target data map(tofrom: i) if(target data: cond)
3131
!$omp end target data
3232

3333
! CHECK: OmpLoopDirective -> llvm::omp::Directive = target teams distribute parallel do simd
3434
! CHECK: OmpClause -> If -> OmpIfClause
35-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = target
35+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = target
3636
! CHECK: OmpClause -> If -> OmpIfClause
37-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = teams
37+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = teams
3838
! CHECK: OmpClause -> If -> OmpIfClause
39-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = parallel
39+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = parallel
4040
! CHECK: OmpClause -> If -> OmpIfClause
41-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = simd
41+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = simd
4242
!$omp target teams distribute parallel do simd if(target: cond) &
4343
!$omp& if(teams: cond) if(parallel: cond) if(simd: cond)
4444
do i = 1, 10
@@ -47,13 +47,13 @@ program openmp_parse_if
4747

4848
! CHECK: OmpBlockDirective -> llvm::omp::Directive = task
4949
! CHECK-NEXT: OmpClause -> If -> OmpIfClause
50-
! CHECK-NEXT: OmpDirectiveNameModifier -> llvm::omp::Directive = task
50+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = task
5151
!$omp task if(task: cond)
5252
!$omp end task
5353

5454
! CHECK: OmpLoopDirective -> llvm::omp::Directive = taskloop
5555
! CHECK-NEXT: OmpClause -> If -> OmpIfClause
56-
! CHECK-NEXT: DirectiveNameModifier -> llvm::omp::Directive = taskloop
56+
! CHECK-NEXT: OmpDirectiveName -> llvm::omp::Directive = taskloop
5757
!$omp taskloop if(taskloop: cond)
5858
do i = 1, 10
5959
end do

flang/test/Parser/OpenMP/metadirective-dirspec.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ subroutine f00(x)
2525
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
2626
!PARSE-TREE: | | | | | | | bool = 'true'
2727
!PARSE-TREE: | | OmpDirectiveSpecification
28-
!PARSE-TREE: | | | llvm::omp::Directive = allocate
28+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = allocate
2929
!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'x'
3030
!PARSE-TREE: | | | OmpClauseList ->
3131

@@ -51,7 +51,7 @@ subroutine f01(x)
5151
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
5252
!PARSE-TREE: | | | | | | | bool = 'true'
5353
!PARSE-TREE: | | OmpDirectiveSpecification
54-
!PARSE-TREE: | | | llvm::omp::Directive = critical
54+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = critical
5555
!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'x'
5656
!PARSE-TREE: | | | OmpClauseList ->
5757

@@ -76,7 +76,7 @@ subroutine f02
7676
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
7777
!PARSE-TREE: | | | | | | | bool = 'true'
7878
!PARSE-TREE: | | OmpDirectiveSpecification
79-
!PARSE-TREE: | | | llvm::omp::Directive = declare mapper
79+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = declare mapper
8080
!PARSE-TREE: | | | OmpArgument -> OmpMapperSpecifier
8181
!PARSE-TREE: | | | | Name = 'mymapper'
8282
!PARSE-TREE: | | | | TypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->
@@ -120,7 +120,7 @@ subroutine f03
120120
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
121121
!PARSE-TREE: | | | | | | | bool = 'true'
122122
!PARSE-TREE: | | OmpDirectiveSpecification
123-
!PARSE-TREE: | | | llvm::omp::Directive = declare reduction
123+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = declare reduction
124124
!PARSE-TREE: | | | OmpArgument -> OmpReductionSpecifier
125125
!PARSE-TREE: | | | | OmpReductionIdentifier -> DefinedOperator -> IntrinsicOperator = Add
126126
!PARSE-TREE: | | | | OmpTypeNameList -> OmpTypeSpecifier -> TypeSpec -> DerivedTypeSpec
@@ -158,7 +158,7 @@ subroutine f04
158158
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
159159
!PARSE-TREE: | | | | | | | bool = 'true'
160160
!PARSE-TREE: | | OmpDirectiveSpecification
161-
!PARSE-TREE: | | | llvm::omp::Directive = declare simd
161+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = declare simd
162162
!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'f04'
163163
!PARSE-TREE: | | | OmpClauseList ->
164164
!PARSE-TREE: ImplicitPart ->
@@ -183,7 +183,7 @@ subroutine f05
183183
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
184184
!PARSE-TREE: | | | | | | | bool = 'true'
185185
!PARSE-TREE: | | OmpDirectiveSpecification
186-
!PARSE-TREE: | | | llvm::omp::Directive = declare target
186+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = declare target
187187
!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'f05'
188188
!PARSE-TREE: | | | OmpClauseList ->
189189
!PARSE-TREE: ImplicitPart ->
@@ -210,7 +210,7 @@ subroutine f06(x, y)
210210
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
211211
!PARSE-TREE: | | | | | | | bool = 'true'
212212
!PARSE-TREE: | | OmpDirectiveSpecification
213-
!PARSE-TREE: | | | llvm::omp::Directive = flush
213+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = flush
214214
!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'x'
215215
!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'y'
216216
!PARSE-TREE: | | | OmpClauseList ->
@@ -237,6 +237,6 @@ subroutine f07
237237
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
238238
!PARSE-TREE: | | | | | | | bool = 'true'
239239
!PARSE-TREE: | | OmpDirectiveSpecification
240-
!PARSE-TREE: | | | llvm::omp::Directive = threadprivate
240+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = threadprivate
241241
!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 't'
242242
!PARSE-TREE: | | | OmpClauseList ->

flang/test/Parser/OpenMP/metadirective-v50.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ subroutine f01
2424
!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant
2525
!PARSE-TREE: | | | | | | | bool = 'true'
2626
!PARSE-TREE: | | OmpDirectiveSpecification
27-
!PARSE-TREE: | | | llvm::omp::Directive = nothing
27+
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = nothing
2828
!PARSE-TREE: | | | OmpClauseList ->
2929
!PARSE-TREE: | OmpClause -> Default -> OmpDefaultClause -> OmpDirectiveSpecification
30-
!PARSE-TREE: | | llvm::omp::Directive = nothing
30+
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = nothing
3131
!PARSE-TREE: | | OmpClauseList ->

0 commit comments

Comments
 (0)