[openmp][openacc][NFC] Simplify access and validation of DirectiveBase…

Authored by clementval on Nov 3 2020, 8:12 AM.


[openmp][openacc][NFC] Simplify access and validation of DirectiveBase information

This patch adds some helper in the DirectiveLanguage wrapper to initialize it from
the RecordKeeper and validate the records. This simplify arguments in lots of function
since only the DirectiveLanguge is passed.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D90358