[PATCH] D90241: [openmp][openacc] Check for duplicate clauses for directive

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 11:48:50 PDT 2020


kiranchandramohan accepted this revision.
kiranchandramohan added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/utils/TableGen/DirectiveEmitter.cpp:151-162
   const auto &DirectiveLanguages =
       Records.getAllDerivedDefinitions("DirectiveLanguage");
 
   if (DirectiveLanguages.size() != 1) {
     PrintError("A single definition of DirectiveLanguage is needed.");
     return;
   }
----------------
clementval wrote:
> kiranchandramohan wrote:
> > Is this code from 151 to 162 similar for all occurrences of HasDuplicateClausesInDirectives? If so would it be better to pull it into a function and use that function?
> I extract it to a function. I plan to add a wrapper for Records so we can get rid of all the `Records.getAllDerivedDefinitions("DirectiveLanguage");` and have simple accessor and also pass just a reference to the records to all those functions that now takes vector of Records. But that will be in a next patch. 
OK


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90241/new/

https://reviews.llvm.org/D90241



More information about the llvm-commits mailing list