[flang-commits] [PATCH] D91909: [flang][openmp] Fix bug in `OmpClause::Hint` clause which was missing to generate inside in OMP.cpp.inc file.
sameeran joshi via Phabricator via flang-commits
flang-commits at lists.llvm.org
Sat Nov 21 02:31:44 PST 2020
sameeranjoshi created this revision.
sameeranjoshi added reviewers: kiranchandramohan, kiranktp, clementval.
Herald added subscribers: guansong, yaxunl.
Herald added a reviewer: sscalpone.
Herald added a project: LLVM.
sameeranjoshi requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91909
Files:
flang/lib/Parser/openmp-parsers.cpp
llvm/include/llvm/Frontend/OpenMP/OMP.td
Index: llvm/include/llvm/Frontend/OpenMP/OMP.td
===================================================================
--- llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -181,7 +181,7 @@
}
def OMPC_Hint : Clause<"hint"> {
let clangClass = "OMPHintClause";
- let flangClass = "ConstantExpr";
+ let flangClassValue = "ConstantExpr";
}
def OMPC_DistSchedule : Clause<"dist_schedule"> {
let clangClass = "OMPDistScheduleClause";
Index: flang/lib/Parser/openmp-parsers.cpp
===================================================================
--- flang/lib/Parser/openmp-parsers.cpp
+++ flang/lib/Parser/openmp-parsers.cpp
@@ -184,7 +184,8 @@
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>(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91909.306832.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20201121/f3f0e805/attachment.bin>
More information about the flang-commits
mailing list