[openacc][openmp] Allow duplicate between required and allowed once/exclusive
authorValentin Clement <clementval@gmail.com>
Thu, 5 Nov 2020 21:21:15 +0000 (16:21 -0500)
committerclementval <clementval@gmail.com>
Thu, 5 Nov 2020 21:21:26 +0000 (16:21 -0500)
commita8a10acba2a769ae0f77e61380e649e7428f68fb
tree88c5f611b373160680fe09e7b0aa52c568470af0
parent6f288b11dba7f7ef01bdc4a3202e908bdc0fb067
[openacc][openmp] Allow duplicate between required and allowed once/exclusive

Validity check introduce in D90241 are a bit too restrict and this patch propose to losen
them a bit. The duplicate clauses is now check only between the three allowed lists and between the
requiredClauses and allowedClauses lists. This allows to enable some check where a clause can be
required but also appear only once on the directive. We found these kind of restriction useful
on the set directive in OpenACC for example.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D90770
llvm/include/llvm/Frontend/Directive/DirectiveBase.td
llvm/test/TableGen/directive3.td
llvm/utils/TableGen/DirectiveEmitter.cpp