[llvm-branch-commits] [clang] [flang] [llvm] [OpenMP] Unify Version with directive::VersionRange (PR #236090)
Krzysztof Parzyszek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Oct 27 06:00:05 PDT 2026
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/236090
>From 22c4c44922438c683c62124c71918cc8f6dbe1cc Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 6 Oct 2026 15:41:15 -0500
Subject: [PATCH 1/2] [OpenMP] Unify Version with directive::VersionRange
The limits of VersionRange will now be represented as Versions,
not int values.
---
clang/lib/Parse/ParseOpenMP.cpp | 4 +-
flang/include/flang/Parser/openmp-utils.h | 5 +-
flang/lib/Parser/openmp-utils.cpp | 5 +-
flang/lib/Semantics/check-omp-syntax.cpp | 7 +-
.../llvm/Frontend/Directive/Spelling.h | 18 +----
.../include/llvm/Frontend/Directive/Version.h | 74 +++++++++++++++++++
.../include/llvm/Frontend/OpenMP/OMPVersion.h | 47 +-----------
llvm/include/llvm/TableGen/DirectiveEmitter.h | 9 ++-
llvm/lib/Frontend/Directive/Spelling.cpp | 12 +--
llvm/test/TableGen/directive1.td | 26 ++++---
llvm/test/TableGen/directive2.td | 24 +++---
llvm/unittests/Frontend/OpenACCTest.cpp | 48 ++++++------
.../Frontend/OpenMPDirectiveNameTest.cpp | 4 +-
.../utils/TableGen/Basic/DirectiveEmitter.cpp | 39 +++++-----
14 files changed, 169 insertions(+), 153 deletions(-)
create mode 100644 llvm/include/llvm/Frontend/Directive/Version.h
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 149ca7d9c0d594..097dd76ce0f33c 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -61,7 +61,7 @@ static OpenMPDirectiveKind checkOpenMPDirectiveName(Parser &P,
SourceLocation Loc,
OpenMPDirectiveKind Kind,
StringRef Name) {
- unsigned Version = P.getLangOpts().OpenMP;
+ llvm::omp::Version Version = P.getLangOpts().getOpenMPVersion();
auto [D, VR] = getOpenMPDirectiveKindAndVersions(Name);
// "ORDERED" is parsed as OMPD_ordered_standalone.
if (D == Directive::OMPD_ordered_blockassoc)
@@ -69,7 +69,7 @@ static OpenMPDirectiveKind checkOpenMPDirectiveName(Parser &P,
assert(D == Kind && "Directive kind mismatch");
// Ignore the case Version > VR.Max: In OpenMP 6.0 all prior spellings
// are explicitly allowed.
- if (static_cast<int>(Version) < VR.Min)
+ if (Version < VR.Min)
P.Diag(Loc, diag::warn_omp_future_directive_spelling) << Name;
return Kind;
diff --git a/flang/include/flang/Parser/openmp-utils.h b/flang/include/flang/Parser/openmp-utils.h
index 4a00b68a2939fc..35df7d9170afda 100644
--- a/flang/include/flang/Parser/openmp-utils.h
+++ b/flang/include/flang/Parser/openmp-utils.h
@@ -79,7 +79,7 @@ auto GetAllowedElements(const DescriptorTy &desc, llvm::omp::Version version) {
template <typename ElemTy, typename OwnerTy>
llvm::directive::VersionRange GetVersionRangeForElement(
ElemTy elemId, OwnerTy ownerId) {
- llvm::omp::Version minVer{std::numeric_limits<int>::max()};
+ llvm::omp::Version minVer{llvm::omp::Version::Max()};
llvm::omp::Version maxVer{0};
const auto &desc{llvm::omp::getDescriptor(ownerId)};
for (llvm::omp::Version v : desc.getVersions()) {
@@ -88,8 +88,7 @@ llvm::directive::VersionRange GetVersionRangeForElement(
maxVer = std::max(maxVer, v);
}
}
- return llvm::directive::VersionRange{
- static_cast<int>(minVer.value()), static_cast<int>(maxVer.value())};
+ return llvm::directive::VersionRange{minVer, maxVer};
}
llvm::directive::VersionRange GetVersionRangeForDirective(
diff --git a/flang/lib/Parser/openmp-utils.cpp b/flang/lib/Parser/openmp-utils.cpp
index fcd9e75e04bd88..9fdae7cd003639 100644
--- a/flang/lib/Parser/openmp-utils.cpp
+++ b/flang/lib/Parser/openmp-utils.cpp
@@ -56,15 +56,14 @@ llvm::omp::Modifiers GetElements(const llvm::omp::descriptor::ModifierSet &desc,
llvm::directive::VersionRange GetVersionRangeForDirective(
llvm::omp::Directive dirId) {
- llvm::omp::Version minVer{std::numeric_limits<int>::max()};
+ llvm::omp::Version minVer{llvm::omp::Version::Max()};
llvm::omp::Version maxVer{0};
auto &desc = llvm::omp::getDescriptor(dirId);
for (llvm::omp::Version v : desc.getVersions()) {
minVer = std::min(minVer, v);
maxVer = std::max(maxVer, v);
}
- return llvm::directive::VersionRange{
- static_cast<int>(minVer.value()), static_cast<int>(maxVer.value())};
+ return llvm::directive::VersionRange{minVer, maxVer};
}
} // namespace descriptor
diff --git a/flang/lib/Semantics/check-omp-syntax.cpp b/flang/lib/Semantics/check-omp-syntax.cpp
index d1e90d0e08738c..ced7a5170e5cbd 100644
--- a/flang/lib/Semantics/check-omp-syntax.cpp
+++ b/flang/lib/Semantics/check-omp-syntax.cpp
@@ -47,9 +47,8 @@ static llvm::omp::Properties GetProperties(
static llvm::omp::Version GetClosestVersion(
llvm::directive::VersionRange range, llvm::omp::Version version) {
if (range.isValid()) {
- int intVer{static_cast<int>(version.value())};
return llvm::omp::Version(
- intVer >= range.Min ? std::min(intVer, range.Max) : range.Min);
+ version >= range.Min ? std::min(version, range.Max) : range.Min);
}
return llvm::omp::Version();
}
@@ -355,7 +354,7 @@ static ResultTy VerifyUltimate(
bool OmpStructureChecker::VerifyClauseVersion(
parser::OmpDirectiveName dirName, const AppliedClauseInfo &info) {
llvm::omp::Version version{context_.langOptions().getOpenMPVersion()};
- llvm::omp::Version maxVer{std::numeric_limits<int>::max()};
+ llvm::omp::Version maxVer{llvm::omp::Version::Max()};
bool isCancel{dirName.v == llvm::omp::Directive::OMPD_cancel ||
dirName.v == llvm::omp::Directive::OMPD_cancellation_point};
@@ -605,7 +604,7 @@ bool OmpStructureChecker::VerifyModifierVersion(
WithSource<llvm::omp::Clause> clause, const AppliedModifierInfo &info) {
// Verify that the specified modifiers are allowed in this version.
llvm::omp::Version version{context_.langOptions().getOpenMPVersion()};
- llvm::omp::Version maxVer{std::numeric_limits<int>::max()};
+ llvm::omp::Version maxVer{llvm::omp::Version::Max()};
auto result = VerifyVersions(info, clause.value, version);
diff --git a/llvm/include/llvm/Frontend/Directive/Spelling.h b/llvm/include/llvm/Frontend/Directive/Spelling.h
index 9c70210a68139b..321c45e5e1e78f 100644
--- a/llvm/include/llvm/Frontend/Directive/Spelling.h
+++ b/llvm/include/llvm/Frontend/Directive/Spelling.h
@@ -10,34 +10,20 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h"
+#include "llvm/Frontend/Directive/Version.h"
#include "llvm/Support/Compiler.h"
#include <limits>
#include <tuple>
namespace llvm::directive {
-
-struct VersionRange {
- static constexpr int MaxValue = std::numeric_limits<int>::max();
- // The default "Version" value in get<Lang><Enum>Name() is 0, include that
- // in the maximum range.
- int Min = 0;
- int Max = MaxValue;
-
- constexpr bool operator<(const VersionRange &R) const {
- return std::tie(Min, Max) < std::tie(R.Min, R.Max);
- }
- constexpr bool isValid() const { return Min <= Max; }
-};
-
struct Spelling {
StringRef Name;
VersionRange Versions;
};
LLVM_ABI StringRef FindName(llvm::iterator_range<const Spelling *>,
- unsigned Version);
-
+ Version Version);
} // namespace llvm::directive
#endif // LLVM_FRONTEND_DIRECTIVE_SPELLING_H
diff --git a/llvm/include/llvm/Frontend/Directive/Version.h b/llvm/include/llvm/Frontend/Directive/Version.h
new file mode 100644
index 00000000000000..f511b91720c059
--- /dev/null
+++ b/llvm/include/llvm/Frontend/Directive/Version.h
@@ -0,0 +1,74 @@
+//===-------------------------------------------------------------- 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_FRONTEND_DIRECTIVE_VERSION_H
+#define LLVM_FRONTEND_DIRECTIVE_VERSION_H
+
+#include "llvm/ADT/DenseMapInfo.h"
+
+#include <limits>
+
+namespace llvm {
+namespace directive {
+struct Version {
+ using value_type = int;
+ constexpr explicit Version(value_type Ver = 0) : V(Ver) {}
+ constexpr explicit operator bool() const { return V != 0; }
+ constexpr value_type value() const { return V; }
+
+ friend constexpr bool operator<(Version A, Version B);
+ friend constexpr bool operator==(Version A, Version B);
+
+ static constexpr Version Max() {
+ return Version(std::numeric_limits<value_type>::max());
+ }
+
+private:
+ value_type V;
+};
+
+inline constexpr bool operator==(Version A, Version B) { return A.V == B.V; }
+inline constexpr bool operator!=(Version A, Version B) { return !(A == B); }
+inline constexpr bool operator<(Version A, Version B) { return A.V < B.V; }
+inline constexpr bool operator<=(Version A, Version B) {
+ return A < B || A == B;
+}
+inline constexpr bool operator>(Version A, Version B) { return !(A <= B); }
+inline constexpr bool operator>=(Version A, Version B) { return !(A < B); }
+
+inline constexpr bool operator==(Version A, int B) { return A == Version(B); }
+inline constexpr bool operator!=(Version A, int B) { return A != Version(B); }
+inline constexpr bool operator<(Version A, int B) { return A < Version(B); }
+inline constexpr bool operator<=(Version A, int B) { return A <= Version(B); }
+inline constexpr bool operator>(Version A, int B) { return A > Version(B); }
+inline constexpr bool operator>=(Version A, int B) { return A >= Version(B); }
+
+struct VersionRange {
+ Version Min = Version(0);
+ Version Max = Version::Max();
+
+ constexpr bool operator<(const VersionRange &R) const {
+ return std::tie(Min, Max) < std::tie(R.Min, R.Max);
+ }
+ constexpr bool isValid() const { return Min <= Max; }
+ constexpr bool contains(Version V) const { return Min <= V && V <= Max; }
+};
+} // namespace directive
+
+template <> struct DenseMapInfo<directive::Version> {
+ static unsigned getHashValue(directive::Version V) {
+ using UnderlyingTy = directive::Version::value_type;
+ return DenseMapInfo<UnderlyingTy>::getHashValue(V.value());
+ }
+ static bool isEqual(directive::Version LHS, directive::Version RHS) {
+ return LHS == RHS;
+ }
+};
+} // namespace llvm
+
+#endif // LLVM_FRONTEND_DIRECTIVE_VERSION_H
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPVersion.h b/llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
index 623d698b7fb80a..4a12c94916ffee 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
@@ -5,55 +5,14 @@
// 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 = int;
- constexpr explicit Version(value_type Ver = 0) : V(Ver) {}
- constexpr explicit operator bool() const { return V != 0; }
- constexpr value_type value() const { return V; }
+#include "llvm/Frontend/Directive/Version.h"
- friend constexpr bool operator<(Version A, Version B);
- friend constexpr bool operator==(Version A, Version B);
-
-private:
- value_type V;
-};
-
-inline constexpr bool operator==(Version A, Version B) { return A.V == B.V; }
-inline constexpr bool operator!=(Version A, Version B) { return !(A == B); }
-inline constexpr bool operator<(Version A, Version B) { return A.V < B.V; }
-inline constexpr bool operator<=(Version A, Version B) {
- return A < B || A == B;
+namespace llvm::omp {
+using Version = llvm::directive::Version;
}
-inline constexpr bool operator>(Version A, Version B) { return !(A <= B); }
-inline constexpr bool operator>=(Version A, Version B) { return !(A < B); }
-
-inline constexpr bool operator==(Version A, int B) { return A == Version(B); }
-inline constexpr bool operator!=(Version A, int B) { return A != Version(B); }
-inline constexpr bool operator<(Version A, int B) { return A < Version(B); }
-inline constexpr bool operator<=(Version A, int B) { return A <= Version(B); }
-inline constexpr bool operator>(Version A, int B) { return A > Version(B); }
-inline constexpr bool operator>=(Version A, int B) { return A >= Version(B); }
-} // namespace omp
-
-template <> struct DenseMapInfo<omp::Version> {
- static unsigned getHashValue(omp::Version V) {
- using UnderlyingTy = omp::Version::value_type;
- return DenseMapInfo<UnderlyingTy>::getHashValue(V.value());
- }
- static bool isEqual(omp::Version LHS, omp::Version RHS) { return LHS == RHS; }
-};
-} // namespace llvm
#endif // LLVM_FRONTEND_OPENMP_OMPVERSION_H
diff --git a/llvm/include/llvm/TableGen/DirectiveEmitter.h b/llvm/include/llvm/TableGen/DirectiveEmitter.h
index 8e7854da502527..4379e1758b3009 100644
--- a/llvm/include/llvm/TableGen/DirectiveEmitter.h
+++ b/llvm/include/llvm/TableGen/DirectiveEmitter.h
@@ -18,6 +18,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Frontend/Directive/Spelling.h"
+#include "llvm/Frontend/Directive/Version.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/TableGen/Record.h"
#include <string>
@@ -129,8 +130,9 @@ class Spelling : public Versioned {
StringRef getText() const { return Def->getValueAsString("spelling"); }
llvm::directive::VersionRange getVersions() const {
- return llvm::directive::VersionRange{getMinVersion(Def),
- getMaxVersion(Def)};
+ return llvm::directive::VersionRange{
+ llvm::directive::Version(getMinVersion(Def)),
+ llvm::directive::Version(getMaxVersion(Def))};
}
Value get() const { return Value{getText(), getVersions()}; }
@@ -173,7 +175,8 @@ class BaseRecord {
// This is a suitable spelling for generating an identifier name,
// since it will remain unchanged when any potential new spellings
// are added.
- Spelling::Value Oldest{"not found", {/*Min=*/INT_MAX, 0}};
+ using Version = directive::Version;
+ Spelling::Value Oldest{"not found", {/*Min=*/Version::Max(), Version(0)}};
for (auto V : getSpellings())
if (V.Versions.Min < Oldest.Versions.Min)
Oldest = V;
diff --git a/llvm/lib/Frontend/Directive/Spelling.cpp b/llvm/lib/Frontend/Directive/Spelling.cpp
index 4992268f2e6778..019fa39eaa8f7b 100644
--- a/llvm/lib/Frontend/Directive/Spelling.cpp
+++ b/llvm/lib/Frontend/Directive/Spelling.cpp
@@ -15,15 +15,9 @@
using namespace llvm;
-static bool Contains(directive::VersionRange V, int P) {
- return V.Min <= P && P <= V.Max;
-}
-
llvm::StringRef llvm::directive::FindName(
- llvm::iterator_range<const directive::Spelling *> Range, unsigned Version) {
- assert(llvm::isInt<8 * sizeof(int)>(Version) && "Version value out of range");
-
- int V = Version;
+ llvm::iterator_range<const directive::Spelling *> Range,
+ directive::Version Ver) {
// Do a linear search to find the first Spelling that contains Version.
// The condition "contains(S, Version)" does not partition the list of
// spellings, so std::[lower|upper]_bound cannot be used.
@@ -31,7 +25,7 @@ llvm::StringRef llvm::directive::FindName(
// linear search seems appropriate. In general, an interval tree may be
// a better choice, but in this case it may be an overkill.
for (auto &S : Range) {
- if (Contains(S.Versions, V))
+ if (S.Versions.contains(Ver))
return S.Name;
}
return StringRef();
diff --git a/llvm/test/TableGen/directive1.td b/llvm/test/TableGen/directive1.td
index ad4413f1413328..33e4a9fce70d6e 100644
--- a/llvm/test/TableGen/directive1.td
+++ b/llvm/test/TableGen/directive1.td
@@ -57,6 +57,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: #include "llvm/ADT/STLExtras.h"
// CHECK-NEXT: #include "llvm/ADT/StringRef.h"
// CHECK-NEXT: #include "llvm/Frontend/Directive/Spelling.h"
+// CHECK-NEXT: #include "llvm/Frontend/Directive/Version.h"
// CHECK-NEXT: #include "llvm/Support/Compiler.h"
// CHECK-NEXT: #include <cstddef>
// CHECK-NEXT: #include <utility>
@@ -191,8 +192,8 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: #endif
// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: constexpr unsigned getDirectivePureSince(Directive) {
-// CHECK-NEXT: return unsigned(2147483647);
+// CHECK-NEXT: constexpr directive::Version getDirectivePureSince(Directive) {
+// CHECK-NEXT: return directive::Version(2147483647);
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: constexpr SourceLanguage getDirectiveLanguages(Directive D) {
@@ -213,7 +214,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: return getTdlDirectiveKindAndVersions(Str).first;
// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: LLVM_ABI StringRef getTdlDirectiveName(Directive D, unsigned V = unsigned(0));
+// CHECK-NEXT: LLVM_ABI StringRef getTdlDirectiveName(Directive D, directive::Version V = directive::Version(0));
// CHECK-EMPTY:
// CHECK-NEXT: LLVM_ABI std::pair<Clause, directive::VersionRange> getTdlClauseKindAndVersions(StringRef Str);
// CHECK-EMPTY:
@@ -221,14 +222,14 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: return getTdlClauseKindAndVersions(Str).first;
// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: LLVM_ABI StringRef getTdlClauseName(Clause C, unsigned V = unsigned(0));
+// CHECK-NEXT: LLVM_ABI StringRef getTdlClauseName(Clause C, directive::Version V = directive::Version(0));
// CHECK-EMPTY:
// CHECK-NEXT: /// Return true if \p C is a valid clause for \p D in version \p V.
-// CHECK-NEXT: LLVM_ABI bool isAllowedClauseForDirective(Directive D, Clause C, unsigned V);
+// CHECK-NEXT: LLVM_ABI bool isAllowedClauseForDirective(Directive D, Clause C, directive::Version V);
// CHECK-EMPTY:
// CHECK-NEXT: constexpr std::size_t getMaxLeafCount() { return 0; }
// CHECK-NEXT: LLVM_ABI bool isAllowedLoopModifier(Directive D, LoopModifier LM);
-// CHECK-NEXT: LLVM_ABI StringRef getLoopModifierName(LoopModifier LM, unsigned V = unsigned(0));
+// CHECK-NEXT: LLVM_ABI StringRef getLoopModifierName(LoopModifier LM, directive::Version V = directive::Version(0));
// CHECK-NEXT: LLVM_ABI AKind getAKind(StringRef Str);
// CHECK-NEXT: LLVM_ABI StringRef getTdlAKindName(AKind x);
// CHECK-EMPTY:
@@ -423,6 +424,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: #undef GEN_DIRECTIVES_IMPL
// IMPL-EMPTY:
// IMPL-NEXT: #include "llvm/Frontend/Directive/Spelling.h"
+// IMPL-NEXT: #include "llvm/Frontend/Directive/Version.h"
// IMPL-NEXT: #include "llvm/Support/ErrorHandling.h"
// IMPL-NEXT: #include <utility>
// IMPL-EMPTY:
@@ -433,7 +435,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: .Default({TDLD_dira, All});
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlDirectiveName(llvm::tdl::Directive Kind, unsigned V) {
+// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlDirectiveName(llvm::tdl::Directive Kind, llvm::directive::Version V) {
// IMPL-NEXT: switch (Kind) {
// IMPL-NEXT: case TDLD_dira:
// IMPL-NEXT: return "dira";
@@ -451,7 +453,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: .Default({TDLC_clauseb, All});
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlClauseName(llvm::tdl::Clause Kind, unsigned V) {
+// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlClauseName(llvm::tdl::Clause Kind, llvm::directive::Version V) {
// IMPL-NEXT: switch (Kind) {
// IMPL-NEXT: case TDLC_clausea:
// IMPL-NEXT: return "clausea";
@@ -459,8 +461,8 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: return "clauseb";
// IMPL-NEXT: case TDLC_clausec: {
// IMPL-NEXT: static constexpr llvm::directive::Spelling TDLC_clausec_spellings[] = {
-// IMPL-NEXT: {"clausec", {0, 2147483647}},
-// IMPL-NEXT: {"ccccccc", {0, 2147483647}},
+// IMPL-NEXT: {"clausec", {directive::Version(0), directive::Version(2147483647)}},
+// IMPL-NEXT: {"ccccccc", {directive::Version(0), directive::Version(2147483647)}},
// IMPL-NEXT: };
// IMPL-NEXT: return llvm::directive::FindName(TDLC_clausec_spellings, V);
// IMPL-NEXT: }
@@ -488,7 +490,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: llvm_unreachable("Invalid Tdl AKind kind");
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(llvm::tdl::Directive D, llvm::tdl::Clause C, unsigned V) {
+// IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(llvm::tdl::Directive D, llvm::tdl::Clause C, llvm::directive::Version V) {
// IMPL-NEXT: assert(unsigned(D) <= Directive_enumSize);
// IMPL-NEXT: assert(unsigned(C) <= Clause_enumSize);
// IMPL-NEXT: switch (D) {
@@ -516,7 +518,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: llvm_unreachable("Invalid Tdl Directive kind");
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: llvm::StringRef llvm::tdl::getLoopModifierName(llvm::tdl::LoopModifier Kind, unsigned V) {
+// IMPL-NEXT: llvm::StringRef llvm::tdl::getLoopModifierName(llvm::tdl::LoopModifier Kind, llvm::directive::Version V) {
// IMPL-NEXT: switch (Kind) {
// IMPL-NEXT: case flattened:
// IMPL-NEXT: return "flattened";
diff --git a/llvm/test/TableGen/directive2.td b/llvm/test/TableGen/directive2.td
index b6cd8d6b6d9cbe..60d83f018b7bd6 100644
--- a/llvm/test/TableGen/directive2.td
+++ b/llvm/test/TableGen/directive2.td
@@ -51,6 +51,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: #include "llvm/ADT/STLExtras.h"
// CHECK-NEXT: #include "llvm/ADT/StringRef.h"
// CHECK-NEXT: #include "llvm/Frontend/Directive/Spelling.h"
+// CHECK-NEXT: #include "llvm/Frontend/Directive/Version.h"
// CHECK-NEXT: #include "llvm/Support/Compiler.h"
// CHECK-NEXT: #include <cstddef>
// CHECK-NEXT: #include <utility>
@@ -157,12 +158,12 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: #endif
// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: constexpr unsigned getDirectivePureSince(Directive Dir) {
+// CHECK-NEXT: constexpr directive::Version getDirectivePureSince(Directive Dir) {
// CHECK-NEXT: switch (Dir) {
// CHECK-NEXT: case TDLD_dira:
-// CHECK-NEXT: return unsigned(57066);
+// CHECK-NEXT: return directive::Version(57066);
// CHECK-NEXT: default:
-// CHECK-NEXT: return unsigned(2147483647);
+// CHECK-NEXT: return directive::Version(2147483647);
// CHECK-NEXT: } // switch (Dir)
// CHECK-NEXT: }
// CHECK-EMPTY:
@@ -184,7 +185,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: return getTdlDirectiveKindAndVersions(Str).first;
// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: LLVM_ABI StringRef getTdlDirectiveName(Directive D, unsigned V = unsigned(0));
+// CHECK-NEXT: LLVM_ABI StringRef getTdlDirectiveName(Directive D, directive::Version V = directive::Version(0));
// CHECK-EMPTY:
// CHECK-NEXT: LLVM_ABI std::pair<Clause, directive::VersionRange> getTdlClauseKindAndVersions(StringRef Str);
// CHECK-EMPTY:
@@ -192,14 +193,14 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// CHECK-NEXT: return getTdlClauseKindAndVersions(Str).first;
// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: LLVM_ABI StringRef getTdlClauseName(Clause C, unsigned V = unsigned(0));
+// CHECK-NEXT: LLVM_ABI StringRef getTdlClauseName(Clause C, directive::Version V = directive::Version(0));
// CHECK-EMPTY:
// CHECK-NEXT: /// Return true if \p C is a valid clause for \p D in version \p V.
-// CHECK-NEXT: LLVM_ABI bool isAllowedClauseForDirective(Directive D, Clause C, unsigned V);
+// CHECK-NEXT: LLVM_ABI bool isAllowedClauseForDirective(Directive D, Clause C, directive::Version V);
// CHECK-EMPTY:
// CHECK-NEXT: constexpr std::size_t getMaxLeafCount() { return 0; }
// CHECK-NEXT: LLVM_ABI bool isAllowedLoopModifier(Directive D, LoopModifier LM);
-// CHECK-NEXT: LLVM_ABI StringRef getLoopModifierName(LoopModifier LM, unsigned V = unsigned(0));
+// CHECK-NEXT: LLVM_ABI StringRef getLoopModifierName(LoopModifier LM, directive::Version V = directive::Version(0));
// CHECK-EMPTY:
// CHECK-NEXT: } // namespace tdl
// CHECK-EMPTY:
@@ -366,6 +367,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: #undef GEN_DIRECTIVES_IMPL
// IMPL-EMPTY:
// IMPL-NEXT: #include "llvm/Frontend/Directive/Spelling.h"
+// IMPL-NEXT: #include "llvm/Frontend/Directive/Version.h"
// IMPL-NEXT: #include "llvm/Support/ErrorHandling.h"
// IMPL-NEXT: #include <utility>
// IMPL-EMPTY:
@@ -376,7 +378,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: .Default({TDLD_dira, All});
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlDirectiveName(llvm::tdl::Directive Kind, unsigned V) {
+// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlDirectiveName(llvm::tdl::Directive Kind, llvm::directive::Version V) {
// IMPL-NEXT: switch (Kind) {
// IMPL-NEXT: case TDLD_dira:
// IMPL-NEXT: return "dira";
@@ -394,7 +396,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: .Default({TDLC_clauseb, All});
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlClauseName(llvm::tdl::Clause Kind, unsigned V) {
+// IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlClauseName(llvm::tdl::Clause Kind, llvm::directive::Version V) {
// IMPL-NEXT: switch (Kind) {
// IMPL-NEXT: case TDLC_clausea:
// IMPL-NEXT: return "clausea";
@@ -408,7 +410,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: llvm_unreachable("Invalid Tdl Clause kind");
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(llvm::tdl::Directive D, llvm::tdl::Clause C, unsigned V) {
+// IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(llvm::tdl::Directive D, llvm::tdl::Clause C, llvm::directive::Version V) {
// IMPL-NEXT: assert(unsigned(D) <= Directive_enumSize);
// IMPL-NEXT: assert(unsigned(C) <= Clause_enumSize);
// IMPL-NEXT: switch (D) {
@@ -436,7 +438,7 @@ def TDL_DirA : Directive<[Spelling<"dira">]> {
// IMPL-NEXT: llvm_unreachable("Invalid Tdl Directive kind");
// IMPL-NEXT: }
// IMPL-EMPTY:
-// IMPL-NEXT: llvm::StringRef llvm::tdl::getLoopModifierName(llvm::tdl::LoopModifier Kind, unsigned V) {
+// IMPL-NEXT: llvm::StringRef llvm::tdl::getLoopModifierName(llvm::tdl::LoopModifier Kind, llvm::directive::Version V) {
// IMPL-NEXT: switch (Kind) {
// IMPL-NEXT: case flattened:
// IMPL-NEXT: return "flattened";
diff --git a/llvm/unittests/Frontend/OpenACCTest.cpp b/llvm/unittests/Frontend/OpenACCTest.cpp
index 1209f50c90f2d4..c5121a3625aca1 100644
--- a/llvm/unittests/Frontend/OpenACCTest.cpp
+++ b/llvm/unittests/Frontend/OpenACCTest.cpp
@@ -9,6 +9,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/Frontend/Directive/Version.h"
#include "llvm/Frontend/OpenACC/ACC.h.inc"
#include "gtest/gtest.h"
@@ -208,7 +209,7 @@ TEST(OpenACCTest, ClauseHelpers) {
EXPECT_EQ(getOpenACCClauseName(ACCC_write), "write");
}
-static void expectAllowedClauses(Directive Dir, unsigned Version,
+static void expectAllowedClauses(Directive Dir, directive::Version Version,
const ArrayRef<Clause> &AllowedClauses) {
SmallSet<Clause, 30> AllowedClausesSet;
for (Clause Cl : AllowedClauses) {
@@ -224,36 +225,37 @@ static void expectAllowedClauses(Directive Dir, unsigned Version,
}
TEST(OpenACCTest, AllowedClause) {
- expectAllowedClauses(ACCD_atomic, 3, {});
- expectAllowedClauses(ACCD_cache, 3, {});
- expectAllowedClauses(ACCD_unknown, 3, {});
- expectAllowedClauses(ACCD_parallel, 0, {}); // Version starts at 1
+ using Version = directive::Version;
+ expectAllowedClauses(ACCD_atomic, Version(3), {});
+ expectAllowedClauses(ACCD_cache, Version(3), {});
+ expectAllowedClauses(ACCD_unknown, Version(3), {});
+ expectAllowedClauses(ACCD_parallel, Version(0), {}); // Version starts at 1
- expectAllowedClauses(ACCD_data, 3,
+ expectAllowedClauses(ACCD_data, Version(3),
{ACCC_if, ACCC_attach, ACCC_copy, ACCC_copyin,
ACCC_copyout, ACCC_create, ACCC_default, ACCC_deviceptr,
ACCC_no_create, ACCC_present});
- expectAllowedClauses(ACCD_declare, 3,
+ expectAllowedClauses(ACCD_declare, Version(3),
{ACCC_copy, ACCC_copyin, ACCC_copyout, ACCC_create,
ACCC_present, ACCC_deviceptr, ACCC_device_resident,
ACCC_link});
expectAllowedClauses(
- ACCD_enter_data, 3,
+ ACCD_enter_data, Version(3),
{ACCC_async, ACCC_if, ACCC_wait, ACCC_attach, ACCC_create, ACCC_copyin});
- expectAllowedClauses(ACCD_exit_data, 3,
+ expectAllowedClauses(ACCD_exit_data, Version(3),
{ACCC_async, ACCC_if, ACCC_wait, ACCC_finalize,
ACCC_copyout, ACCC_delete, ACCC_detach});
- expectAllowedClauses(ACCD_host_data, 3,
+ expectAllowedClauses(ACCD_host_data, Version(3),
{ACCC_if, ACCC_if_present, ACCC_use_device});
- expectAllowedClauses(ACCD_init, 3,
+ expectAllowedClauses(ACCD_init, Version(3),
{ACCC_device_num, ACCC_device_type, ACCC_if});
- expectAllowedClauses(ACCD_kernels, 3,
+ expectAllowedClauses(ACCD_kernels, Version(3),
{ACCC_attach, ACCC_copy, ACCC_copyin, ACCC_copyout,
ACCC_create, ACCC_device_type, ACCC_no_create,
ACCC_present, ACCC_deviceptr, ACCC_async, ACCC_default,
@@ -261,7 +263,7 @@ TEST(OpenACCTest, AllowedClause) {
ACCC_vector_length, ACCC_wait});
expectAllowedClauses(
- ACCD_kernels_loop, 3,
+ ACCD_kernels_loop, Version(3),
{ACCC_copy, ACCC_copyin, ACCC_copyout, ACCC_create,
ACCC_device_type, ACCC_no_create, ACCC_present, ACCC_private,
ACCC_reduction, ACCC_deviceptr, ACCC_attach, ACCC_async,
@@ -270,13 +272,13 @@ TEST(OpenACCTest, AllowedClause) {
ACCC_vector, ACCC_vector_length, ACCC_wait, ACCC_worker,
ACCC_auto, ACCC_independent, ACCC_seq});
- expectAllowedClauses(ACCD_loop, 3,
+ expectAllowedClauses(ACCD_loop, Version(3),
{ACCC_device_type, ACCC_private, ACCC_reduction,
ACCC_collapse, ACCC_gang, ACCC_tile, ACCC_vector,
ACCC_worker, ACCC_auto, ACCC_independent, ACCC_seq});
expectAllowedClauses(
- ACCD_parallel, 3,
+ ACCD_parallel, Version(3),
{ACCC_async, ACCC_wait, ACCC_num_gangs, ACCC_num_workers,
ACCC_vector_length, ACCC_device_type, ACCC_if, ACCC_self,
ACCC_copy, ACCC_copyin, ACCC_copyout, ACCC_create,
@@ -284,7 +286,7 @@ TEST(OpenACCTest, AllowedClause) {
ACCC_private, ACCC_firstprivate, ACCC_reduction, ACCC_default});
expectAllowedClauses(
- ACCD_parallel_loop, 3,
+ ACCD_parallel_loop, Version(3),
{ACCC_attach, ACCC_copy, ACCC_copyin, ACCC_copyout,
ACCC_create, ACCC_deviceptr, ACCC_device_type, ACCC_firstprivate,
ACCC_no_create, ACCC_present, ACCC_private, ACCC_reduction,
@@ -293,11 +295,11 @@ TEST(OpenACCTest, AllowedClause) {
ACCC_num_workers, ACCC_self, ACCC_vector, ACCC_vector_length,
ACCC_worker, ACCC_auto, ACCC_independent, ACCC_seq});
- expectAllowedClauses(ACCD_routine, 3,
+ expectAllowedClauses(ACCD_routine, Version(3),
{ACCC_bind, ACCC_device_type, ACCC_nohost, ACCC_gang,
ACCC_seq, ACCC_vector, ACCC_worker});
- expectAllowedClauses(ACCD_serial, 3,
+ expectAllowedClauses(ACCD_serial, Version(3),
{ACCC_attach, ACCC_copy, ACCC_copyin, ACCC_copyout,
ACCC_create, ACCC_deviceptr, ACCC_device_type,
ACCC_no_create, ACCC_present, ACCC_private,
@@ -305,7 +307,7 @@ TEST(OpenACCTest, AllowedClause) {
ACCC_async, ACCC_default, ACCC_if, ACCC_self});
expectAllowedClauses(
- ACCD_serial_loop, 3,
+ ACCD_serial_loop, Version(3),
{ACCC_attach, ACCC_copy, ACCC_copyin, ACCC_copyout,
ACCC_create, ACCC_deviceptr, ACCC_device_type, ACCC_firstprivate,
ACCC_no_create, ACCC_present, ACCC_private, ACCC_reduction,
@@ -315,17 +317,17 @@ TEST(OpenACCTest, AllowedClause) {
ACCC_seq});
expectAllowedClauses(
- ACCD_set, 3,
+ ACCD_set, Version(3),
{ACCC_default_async, ACCC_device_num, ACCC_device_type, ACCC_if});
- expectAllowedClauses(ACCD_shutdown, 3,
+ expectAllowedClauses(ACCD_shutdown, Version(3),
{ACCC_device_num, ACCC_device_type, ACCC_if});
- expectAllowedClauses(ACCD_update, 3,
+ expectAllowedClauses(ACCD_update, Version(3),
{ACCC_async, ACCC_wait, ACCC_device_type, ACCC_if,
ACCC_if_present, ACCC_self, ACCC_host, ACCC_device});
- expectAllowedClauses(ACCD_wait, 3, {ACCC_async, ACCC_if});
+ expectAllowedClauses(ACCD_wait, Version(3), {ACCC_async, ACCC_if});
}
} // namespace
diff --git a/llvm/unittests/Frontend/OpenMPDirectiveNameTest.cpp b/llvm/unittests/Frontend/OpenMPDirectiveNameTest.cpp
index 519e6b9c3fced1..a48a91b95224e3 100644
--- a/llvm/unittests/Frontend/OpenMPDirectiveNameTest.cpp
+++ b/llvm/unittests/Frontend/OpenMPDirectiveNameTest.cpp
@@ -82,7 +82,7 @@ TEST(OpenMPDirectiveNames, DirectiveKind52) {
auto [K, R] = getOpenMPDirectiveKindAndVersions(Name);
ASSERT_EQ(K, Kind);
// Expect the name to be valid in 5.2, but not in 6.0.
- EXPECT_TRUE(52 <= R.Max && R.Max < 60);
+ EXPECT_TRUE(R.Max >= 52 && R.Max < 60);
}
}
@@ -91,6 +91,6 @@ TEST(OpenMPDirectiveNames, DirectiveKind60) {
auto [K, R] = getOpenMPDirectiveKindAndVersions(Name);
ASSERT_EQ(K, Kind);
// Expect the name to be valid in 6.0 and later.
- EXPECT_TRUE(60 <= R.Min);
+ EXPECT_TRUE(R.Min >= 60);
}
}
diff --git a/llvm/utils/TableGen/Basic/DirectiveEmitter.cpp b/llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
index 73435d73147ada..c0175d4d0dfaff 100644
--- a/llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
@@ -37,17 +37,9 @@ enum class Frontend { LLVM, Flang, Clang };
static void emitDirectivesConstexprImpl(const DirectiveLanguage &DirLang,
raw_ostream &OS);
-static StringRef getVersionType(const DirectiveLanguage &DirLang) {
- if (DirLang.getName() == "OpenMP")
- return "Version";
- return "unsigned";
-}
-
-static std::string getVersionValue(const DirectiveLanguage &DirLang,
- StringRef V) {
- if (DirLang.getName() == "OpenMP")
- return V.str() + ".value()";
- return V.str();
+static StringRef getVersionType(const DirectiveLanguage &DirLang,
+ bool FullQual = false) {
+ return FullQual ? "llvm::directive::Version" : "directive::Version";
}
static StringRef getFESpelling(Frontend FE) {
@@ -288,8 +280,7 @@ static void emitDirectivesDecl(const RecordKeeper &Records, raw_ostream &OS) {
OS << "#include \"llvm/ADT/STLExtras.h\"\n";
OS << "#include \"llvm/ADT/StringRef.h\"\n";
OS << "#include \"llvm/Frontend/Directive/Spelling.h\"\n";
- if (DirLang.getName() == "OpenMP")
- OS << "#include \"llvm/Frontend/OpenMP/OMPVersion.h\"\n";
+ OS << "#include \"llvm/Frontend/Directive/Version.h\"\n";
OS << "#include \"llvm/Support/Compiler.h\"\n";
OS << "#include <cstddef>\n"; // for size_t
OS << "#include <utility>\n"; // for std::pair
@@ -412,10 +403,12 @@ orderSpellings(ArrayRef<Spelling::Value> Spellings) {
static void generateGetName(ArrayRef<const Record *> Records, raw_ostream &OS,
StringRef Enum, const DirectiveLanguage &DirLang,
StringRef LangName, StringRef Prefix) {
+ StringRef VersionType = getVersionType(DirLang);
std::string Qual = getQualifier(DirLang);
OS << "\n";
OS << "llvm::StringRef " << Qual << "get" << LangName << Enum << "Name("
- << Qual << Enum << " Kind, " << getVersionType(DirLang) << " V) {\n";
+ << Qual << Enum << " Kind, " << getVersionType(DirLang, /*FullQual=*/true)
+ << " V) {\n";
OS << " switch (Kind) {\n";
for (const Record *R : Records) {
BaseRecord Rec(R);
@@ -432,12 +425,13 @@ static void generateGetName(ArrayRef<const Record *> Records, raw_ostream &OS,
OS << " static constexpr llvm::directive::Spelling " << SpellingsName
<< "[] = {\n";
for (auto &S : Spellings) {
- OS << " {\"" << S.Name << "\", {" << S.Versions.Min << ", "
- << S.Versions.Max << "}},\n";
+ OS << " {\"" << S.Name << "\", {" << VersionType << "("
+ << S.Versions.Min.value() << "), " << VersionType << "("
+ << S.Versions.Max.value() << ")}},\n";
}
OS << " };\n";
- OS << " return llvm::directive::FindName(" << SpellingsName << ", "
- << getVersionValue(DirLang, "V") << ");\n";
+ OS << " return llvm::directive::FindName(" << SpellingsName << ", V"
+ << ");\n";
OS << " }\n";
}
}
@@ -476,6 +470,7 @@ static void generateGetKind(ArrayRef<const Record *> Records, raw_ostream &OS,
<< "directive::VersionRange>>(Str)\n";
directive::VersionRange All;
+ StringRef VersionType = getVersionType(DirLang);
// When a given spelling maps to more than one enum kind, this function
// will return one of them, but it's unspecified which one.
@@ -497,7 +492,8 @@ static void generateGetKind(ArrayRef<const Record *> Records, raw_ostream &OS,
if (Versions.Min == All.Min && Versions.Max == All.Max)
OS << "All})\n";
else
- OS << "{" << Versions.Min << ", " << Versions.Max << "}})\n";
+ OS << "{" << VersionType << "(" << Versions.Min.value() << "), "
+ << VersionType << "(" << Versions.Max.value() << ")}})\n";
}
}
OS << " .Default({" << DefaultName << ", All});\n";
@@ -585,8 +581,8 @@ static void generateIsAllowedClause(const DirectiveLanguage &DirLang,
OS << "\n";
OS << "bool " << Qual << "isAllowedClauseForDirective(" << Qual
- << "Directive D, " << Qual << "Clause C, " << getVersionType(DirLang)
- << " V) {\n";
+ << "Directive D, " << Qual << "Clause C, "
+ << getVersionType(DirLang, /*FullQual=*/true) << " V) {\n";
OS << " assert(unsigned(D) <= Directive_enumSize);\n";
OS << " assert(unsigned(C) <= Clause_enumSize);\n";
@@ -1460,6 +1456,7 @@ void emitDirectivesBasicImpl(const DirectiveLanguage &DirLang,
StringRef CPrefix = DirLang.getClausePrefix();
OS << "#include \"llvm/Frontend/Directive/Spelling.h\"\n";
+ OS << "#include \"llvm/Frontend/Directive/Version.h\"\n";
OS << "#include \"llvm/Support/ErrorHandling.h\"\n";
OS << "#include <utility>\n";
>From c2b24f61c367f58cce2b05cadf8d5c219b4e39b3 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 27 Oct 2026 07:59:53 -0500
Subject: [PATCH 2/2] Update llvm/include/llvm/Frontend/Directive/Version.h
Co-authored-by: Tarun Prabhu <tarun at lanl.gov>
---
llvm/include/llvm/Frontend/Directive/Version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/Frontend/Directive/Version.h b/llvm/include/llvm/Frontend/Directive/Version.h
index f511b91720c059..2be73e210fbcfb 100644
--- a/llvm/include/llvm/Frontend/Directive/Version.h
+++ b/llvm/include/llvm/Frontend/Directive/Version.h
@@ -1,4 +1,4 @@
-//===-------------------------------------------------------------- C++ -*-===//
+//===------------------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
More information about the llvm-branch-commits
mailing list