[flang][NFC] Unify OpenMP and OpenACC structure checker
authorValentin Clement <clementval@gmail.com>
Wed, 5 Aug 2020 18:20:26 +0000 (14:20 -0400)
committerclementval <clementval@gmail.com>
Wed, 5 Aug 2020 18:25:49 +0000 (14:25 -0400)
commit40626184cf95a08f8c62192fa19cd8a71a476206
tree2456faa083c405c23923b165018b5b28850aaed7
parent9fdd0df9497e5b74a3739e651d218c1251b8ef78
[flang][NFC] Unify OpenMP and OpenACC structure checker

This patch remove duplicated code between the check-omp-structure and the check-acc-structure
and unify it into a check-directive-structure templated class.

Reviewed By: kiranchandramohan, sscalpone, ichoyjx

Differential Revision: https://reviews.llvm.org/D85104
flang/lib/Semantics/check-acc-structure.cpp
flang/lib/Semantics/check-acc-structure.h
flang/lib/Semantics/check-directive-structure.h [new file with mode: 0644]
flang/lib/Semantics/check-omp-structure.cpp
flang/lib/Semantics/check-omp-structure.h
flang/test/Semantics/acc-clause-validity.f90
flang/test/Semantics/omp-clause-validity01.f90
flang/test/Semantics/omp-declarative-directive.f90
llvm/test/TableGen/directive1.td
llvm/test/TableGen/directive2.td
llvm/utils/TableGen/DirectiveEmitter.cpp