[PATCH] D77113: [OpenMP][NFC] Move and simplify directive -> allowed clause mapping

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 30 19:41:20 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: lebedev.ri, JonChesterfield, ABataev.
Herald added subscribers: jfb, guansong, bollu, hiraditya.
Herald added a project: clang.
jdoerfert added a reviewer: fghanim.

Move the listing of allowed clauses per OpenMP directive to the new
macro file in `llvm/Frontend/OpenMP`. Also, use a single generic macro
that specifies the directive and one allowed clause explicitly instead
of a dedicated macro per directive.

We save 800 loc and boilerplate for all new directives/clauses with no
functional change. We also need to include the macro file only once and
not once per directive.

Depends on D77112 <https://reviews.llvm.org/D77112>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77113

Files:
  clang/include/clang/ASTMatchers/ASTMatchers.h
  clang/include/clang/Basic/OpenMPKinds.def
  clang/include/clang/Basic/OpenMPKinds.h
  clang/lib/Basic/OpenMPKinds.cpp
  llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  llvm/lib/Frontend/OpenMP/OMPConstants.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77113.253770.patch
Type: text/x-patch
Size: 103093 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200331/ab65c4fb/attachment-0001.bin>


More information about the cfe-commits mailing list