[openmp] Use Directive_enumSize instead of OMPD_unknown position
authorValentin Clement <clementval@gmail.com>
Thu, 25 Jun 2020 13:17:15 +0000 (09:17 -0400)
committerclementval <clementval@gmail.com>
Thu, 25 Jun 2020 13:18:54 +0000 (09:18 -0400)
commit5b9ce07a761f7d62ad793f9827750243de597215
treea8569d88ff1115e9062a4b564a64d7c1553e2ad0
parent4837daf8836c66b7b28f58d412173dd7a51f0fdd
[openmp] Use Directive_enumSize instead of OMPD_unknown position

Summary:
Previously OMPD_unknown was last item in the Directive enumeration and its position was
used in various comparison and assertion. With the new Directive enumeration, this should be
change with  llvm::omp::Directive_enumSize. This patch fix two place where it was not done in
D81736.

Reviewers: vdmitrie, jdoerfert, jdenny

Reviewed By: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82518
clang/lib/Basic/OpenMPKinds.cpp
clang/lib/Parse/ParseOpenMP.cpp