Skip to content

Commit 5a137b3

Browse files
committed
[flang][OpenMP] Remember to set source in OmpBlockConstruct
Add "sourced" in a few places where OmpBlockConstruct was created.
1 parent a5d3522 commit 5a137b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,8 +1832,8 @@ TYPE_PARSER(sourced(construct<OpenMPDeclareMapperConstruct>(
18321832
TYPE_PARSER(construct<OmpReductionCombiner>(Parser<AssignmentStmt>{}) ||
18331833
construct<OmpReductionCombiner>(Parser<FunctionReference>{}))
18341834

1835-
TYPE_PARSER(construct<OpenMPCriticalConstruct>(
1836-
OmpBlockConstructParser{llvm::omp::Directive::OMPD_critical}))
1835+
TYPE_PARSER(sourced(construct<OpenMPCriticalConstruct>(
1836+
OmpBlockConstructParser{llvm::omp::Directive::OMPD_critical})))
18371837

18381838
// 2.11.3 Executable Allocate directive
18391839
TYPE_PARSER(
@@ -1908,12 +1908,12 @@ TYPE_PARSER(
19081908
Parser<OmpMetadirectiveDirective>{})) /
19091909
endOmpLine))
19101910

1911-
TYPE_PARSER(construct<OpenMPAssumeConstruct>(
1912-
sourced(OmpBlockConstructParser{llvm::omp::Directive::OMPD_assume})))
1911+
TYPE_PARSER(sourced(construct<OpenMPAssumeConstruct>(
1912+
OmpBlockConstructParser{llvm::omp::Directive::OMPD_assume})))
19131913

19141914
// Block Construct
19151915
#define MakeBlockConstruct(dir) \
1916-
construct<OmpBlockConstruct>(OmpBlockConstructParser{dir})
1916+
sourced(construct<OmpBlockConstruct>(OmpBlockConstructParser{dir}))
19171917
TYPE_PARSER( //
19181918
MakeBlockConstruct(llvm::omp::Directive::OMPD_masked) ||
19191919
MakeBlockConstruct(llvm::omp::Directive::OMPD_master) ||

0 commit comments

Comments
 (0)