16
16
#include " flang/Lower/PFTBuilder.h"
17
17
#include " flang/Parser/parse-tree.h"
18
18
#include " mlir/Dialect/OpenMP/OpenMPDialect.h"
19
+ #include " llvm/Frontend/OpenMP/OMPConstants.h"
19
20
20
21
#define TODO () llvm_unreachable(" not yet implemented" )
21
22
@@ -28,24 +29,24 @@ void Fortran::lower::genOMP(
28
29
std::get<Fortran::parser::OmpSimpleStandaloneDirective>(
29
30
simpleStandaloneConstruct.t );
30
31
switch (directive.v ) {
31
- #if 0 // does not compile
32
- case Fortran::parser::OmpSimpleStandaloneDirective::Directive::Barrier:
32
+
33
+ default :
34
+ break ;
35
+ case llvm::omp::Directive::OMPD_barrier:
33
36
absConv.getFirOpBuilder ().create <mlir::omp::BarrierOp>(
34
37
absConv.getCurrentLocation ());
35
38
break ;
36
- case Fortran::parser::OmpSimpleStandaloneDirective:: Directive::Taskwait :
39
+ case llvm::omp:: Directive::OMPD_taskwait :
37
40
TODO ();
38
- case Fortran::parser::OmpSimpleStandaloneDirective:: Directive::Taskyield :
41
+ case llvm::omp:: Directive::OMPD_taskyield :
39
42
TODO ();
40
- case Fortran::parser::OmpSimpleStandaloneDirective::Directive::
41
- TargetEnterData:
43
+ case llvm::omp::Directive::OMPD_target_enter_data:
42
44
TODO ();
43
- case Fortran::parser::OmpSimpleStandaloneDirective:: Directive::TargetExitData :
45
+ case llvm::omp:: Directive::OMPD_target_exit_data :
44
46
TODO ();
45
- case Fortran::parser::OmpSimpleStandaloneDirective:: Directive::TargetUpdate :
47
+ case llvm::omp:: Directive::OMPD_target_update :
46
48
TODO ();
47
- case Fortran::parser::OmpSimpleStandaloneDirective::Directive::Ordered:
48
- #endif
49
+ case llvm::omp::Directive::OMPD_ordered:
49
50
TODO ();
50
51
}
51
52
}
0 commit comments