[flang-commits] [clang] [flang] [llvm] [OpenMP] Make OpenMP version have separate type (PR #219820)

Alexey Bataev via flang-commits flang-commits at lists.llvm.org
Mon Aug 31 13:01:32 PDT 2026


================
@@ -0,0 +1,63 @@
+//===-- OMPVersion.h - OpenMP version definition ------------------ C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains the core set of OpenMP definitions and declarations.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_FRONTEND_OPENMP_OMPVERSION_H
+#define LLVM_FRONTEND_OPENMP_OMPVERSION_H
+
+#include "llvm/ADT/DenseMapInfo.h"
+
+namespace llvm {
+namespace omp {
+struct Version {
+  using value_type = unsigned;
+  constexpr Version(value_type Ver = 0) : V(Ver) {}
+  constexpr operator value_type() const { return V; }
+  constexpr explicit operator bool() const { return V != 0; }
+
+  friend constexpr bool operator<(Version A, Version B);
+  friend constexpr bool operator==(Version A, Version B);
----------------
alexey-bataev wrote:

Remove

https://github.com/llvm/llvm-project/pull/219820


More information about the flang-commits mailing list