From 2ddba3082ca79080b14f372ebe4b5bdbc5f694ed Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 1 Jul 2020 20:57:11 -0400 Subject: [flang][openmp] Use common Directive and Clause enum from llvm/Frontend Summary: This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file. Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx Reviewed By: DavidTruby, ichoyjx Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits Tags: #llvm, #flang, #clang Differential Revision: https://reviews.llvm.org/D82906 --- clang/lib/CodeGen/CGOpenMPRuntime.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp') diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 1ff62fd5894a..858dbbf81f20 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -6680,6 +6680,8 @@ emitNumTeamsForTargetDirective(CodeGenFunction &CGF, case OMPD_requires: case OMPD_unknown: break; + default: + break; } llvm_unreachable("Unexpected directive kind."); } @@ -6995,6 +6997,8 @@ emitNumThreadsForTargetDirective(CodeGenFunction &CGF, case OMPD_requires: case OMPD_unknown: break; + default: + break; } llvm_unreachable("Unsupported directive kind."); } @@ -8914,6 +8918,7 @@ getNestedDistributeDirective(ASTContext &Ctx, const OMPExecutableDirective &D) { case OMPD_parallel_master_taskloop_simd: case OMPD_requires: case OMPD_unknown: + default: llvm_unreachable("Unexpected directive."); } } @@ -9704,6 +9709,7 @@ void CGOpenMPRuntime::scanForTargetRegionsFunctions(const Stmt *S, case OMPD_parallel_master_taskloop_simd: case OMPD_requires: case OMPD_unknown: + default: llvm_unreachable("Unknown target directive for OpenMP device codegen."); } return; @@ -10362,6 +10368,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall( case OMPD_target_parallel_for_simd: case OMPD_requires: case OMPD_unknown: + default: llvm_unreachable("Unexpected standalone target data directive."); break; } -- cgit v1.2.3-65-gdbad