OSDN Git Service

[openmp] Move isAllowedClauseForDirective to tablegen + add clause version to OMP.td
authorValentin Clement <clementval@gmail.com>
Tue, 7 Jul 2020 02:19:43 +0000 (22:19 -0400)
committerclementval <clementval@gmail.com>
Tue, 7 Jul 2020 02:20:06 +0000 (22:20 -0400)
commit65482e8a703d4bfe8b9fb5771e34755045d5a5d7
tree05132627f1bd34e01e6ec51cb12cbd545267c7d5
parent939d8309dbd4ee6cf6e9ef3e8ea26df008b006b4
[openmp] Move isAllowedClauseForDirective to tablegen + add clause version to OMP.td

Summary:
Generate the isAllowedClauseForDirective function from tablegen. This patch introduce
the VersionedClause in the tablegen file so that clause can be encapsulated in this class to
specify a range of validity on a directive.

VersionedClause has default minVersion, maxVersion so it can be used without them or
minVersion.

Reviewers: jdoerfert, jdenny

Reviewed By: jdenny

Subscribers: yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82982
llvm/include/llvm/Frontend/Directive/DirectiveBase.td
llvm/include/llvm/Frontend/OpenMP/OMP.td
llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
llvm/lib/Frontend/OpenMP/OMPConstants.cpp
llvm/test/TableGen/directive1.td
llvm/test/TableGen/directive2.td
llvm/utils/TableGen/DirectiveEmitter.cpp