Skip to content

Commit 1708e71

Browse files
committed
Use existing constant
1 parent 0599bff commit 1708e71

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@
4141
namespace Fortran::parser {
4242
using namespace Fortran::parser::omp;
4343

44-
static constexpr size_t DirectiveCount{
45-
static_cast<size_t>(llvm::omp::Directive::Last_) -
46-
static_cast<size_t>(llvm::omp::Directive::First_) + 1};
47-
using DirectiveSet = llvm::Bitset<llvm::NextPowerOf2(DirectiveCount)>;
44+
using DirectiveSet =
45+
llvm::Bitset<llvm::NextPowerOf2(llvm::omp::Directive_enumSize)>;
4846

4947
// Helper function to print the buffer contents starting at the current point.
5048
[[maybe_unused]] static std::string ahead(const ParseState &state) {

0 commit comments

Comments
 (0)