[llvm-branch-commits] [llvm] 42ecf18 - [flang][openmp] Fix bug in `OmpClause::Hint` clause which was missing to generate inside in OMP.cpp.inc file.

Sameeran joshi via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Nov 21 05:37:15 PST 2020


Author: sameeran joshi
Date: 2020-11-21T19:02:34+05:30
New Revision: 42ecf188b5ae1199d5b7405c521a3e72f80e7e94

URL: https://github.com/llvm/llvm-project/commit/42ecf188b5ae1199d5b7405c521a3e72f80e7e94
DIFF: https://github.com/llvm/llvm-project/commit/42ecf188b5ae1199d5b7405c521a3e72f80e7e94.diff

LOG: [flang][openmp] Fix bug in `OmpClause::Hint` clause which was missing to generate inside in OMP.cpp.inc file.

Before this patch "Hint" isn't found inside the generated file.
./bin/llvm-tblgen --gen-directive-gen ../llvm-project/llvm/include/llvm/Frontend/OpenMP/OMP.td -I ../llvm-project/llvm/include/ > OMP.cpp.in

Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D91909

Added: 
    

Modified: 
    flang/lib/Parser/openmp-parsers.cpp
    llvm/include/llvm/Frontend/OpenMP/OMP.td

Removed: 
    


################################################################################
diff  --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index 5a7fd3d9c353..8ad13dffea04 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -184,7 +184,8 @@ TYPE_PARSER(
                   parenthesized(Parser<OmpObjectList>{}))) ||
     "GRAINSIZE" >> construct<OmpClause>(construct<OmpClause::Grainsize>(
                        parenthesized(scalarIntExpr))) ||
-    "HINT" >> construct<OmpClause>(parenthesized(constantExpr)) ||
+    "HINT" >> construct<OmpClause>(
+                  construct<OmpClause::Hint>(parenthesized(constantExpr))) ||
     "IF" >> construct<OmpClause>(parenthesized(Parser<OmpIfClause>{})) ||
     "INBRANCH" >> construct<OmpClause>(construct<OmpClause::Inbranch>()) ||
     "IS_DEVICE_PTR" >> construct<OmpClause>(construct<OmpClause::IsDevicePtr>(

diff  --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index 1ecf075c38a9..e73517697547 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -200,7 +200,7 @@ def OMPC_NumTasks : Clause<"num_tasks"> {
 }
 def OMPC_Hint : Clause<"hint"> {
   let clangClass = "OMPHintClause";
-  let flangClass = "ConstantExpr";
+  let flangClassValue = "ConstantExpr";
 }
 def OMPC_DistSchedule : Clause<"dist_schedule"> {
   let clangClass = "OMPDistScheduleClause";


        


More information about the llvm-branch-commits mailing list